----------------------------------

 


1
.Which are the main features of XML?  
a. Text data description  
b. Human- and computer-friendly format  
c. Handles data in a tree structure having one-and only one-root element  
d. All mentioned above  
ans:d  
2
.Which is a language for finding information in an XML document?  
a. Xpath  
b. XSLT  
c. XLink  
d. XPointer  
ans:a  
3
.Find the correct syntax of the declaration which defines the XML Version?  
a. < ?xml version= "1.0" ? >  
b. < xml version="1.0"/ >  
c. < ?xml version="1.0" / >  
d. None of the above  
ans:a  
4
.An XML DOM parser converts an XML document into an XML DOM object, which can then be  
manipulated with JavaScript.  
a.True b.False  
ans:a  
5
. Abbreviate the term DOM?  
a. Developed Object Model  
b. Document Object Model  
c. Document Oriented Model  
ans:b  
6
.Which language is case sensitive?  
a. HTML  
b. XML  
c. Both A & B  
d. None of the above  
ans:b  
7
.Which parser is read only?  
a.DOM  
b.SAX  
c.Both  
d.None  
ans:b  
8
.The getElementsByTagName() method is used to retrieve data from an XML document.  
a. True  
b. False  
ans:a  
9
<
<
<
<
. The following example shows which XML Syntax rule,  
note date=" 12/11/2007">  
to>Tove< /to>  
from>Jani< /from>  
/note>  
a. XML Attribute Values Must be Quoted  
b. All XML Elements Must Have a Closing Tag  
c. XML Tags are Case Sensitive  
d. XML Elements Must be Properly Nested  
ans:all the above  
1
0. XML is ?  
a. Platform Independent  
b. Language Independent  
c. Both A & B  
d. None of the above  
ans:c  
1
1. Which are the techniques for defining the structure of a specific type of XML documents?  
a. Schema  
b. DTD  
c. Both A & B  
d. None of the above  
ans:c  
1
2.Which is not a XML function?  
a. Transport information  
b. Style information  
c. Store information  
d. Structure information  
ans:b  
1
<
<
<
<
<
3. Is this a 'well formed' XML document?  
?xml version="1.0"? >  
note >  
to age="29" >John< /to >  
from >Smiley< / from >  
/ note >  
a. True  
b. False  
ans:a  
1
4.Which character in the XML Element will generate an error because the parser interprets it as the  
start of a new element?  
a. " < "  
b. "&"  
c. Both A & B  
d. None of the above  
ans:a  
1
5. Which is not a W3C-recommended specification?  
a. SAX  
b. DOM  
c. Both A & B  
d. None of the above  
ans:a  
1
6. Which internet language is used for describing available web services in XML?  
a. WSDL  
b. RSS  
c. RDF  
d. OWL  
ans:a  
1
7.XML is the most common tool for data transmissions between all sorts of applications  
a. True  
b. False  
ans:a  
1
8. Which is a software- and hardware-independent tool for carrying information?  
a. HTML  
b. XML  
c. Both A & B  
d. None of the above  
ans:b  
1
9.Which Characters are illegal in XML elements?  
a. " < "  
b. "&"  
c. Both A & B  
d. None of the above  
ans:c  
2
0. What is XML used to simplify?  
a. Data storage  
b. Data sharing  
c. Both A & B  
d. None of the above  
ans:c  
2
1.Which are the XML Syntax rules?  
a. All XML Elements Must Have a Closing Tag  
b. XML Tags are not Case Sensitive  
c. XML Elements Must be Properly Nested  
d. Both A & C  
ans:d  
2
2. XML documents must contain a root element; this element is "the parent" of all other elements  
a. True  
b. False  
ans:a  
2
3.XML is designed to store data and _____.  
a. Design  
b. Verify  
c. Transport  
d. Both A & B  
ans: c  
2
4.XML attribute values must always be enclosed in quotes  
a. True  
b. False  
ans:a  
2
5.XML is designed to carry data, and to display data  
a. True  
b. False  
ans:b  
2
6.In XML document comments are given as?  
a. < !-- -->  
b. < !-- ?  
c. < /-- -->  
d. < ?-- ?  
ans:a  
2
7.Which of the following is true about SAX parsing?  
a. SAX parser reads an XML document from top to bottom, recognizing the tokens that make up a  
well-formed XML document.  
b. SAX parser reports the application program the nature of tokens that the parser has encountered  
as they occur  
c. The application program provides an 'event' handler that must be registered with the parser.  
d.All of the above.  
ans:d  
2
8.Which of the following method get called when element ends in SAX parsing?  
a. startDocument()  
b.endDocument()  
c.startElement()  
d. endElement()  
ans:d  
2
9. Which method of JDOM Parser gets the root element of the XML?  
a. Element.getRootElement()  
b. Document.getRootElement()  
c. Node.getRootElement()  
d.Node.getChild(Name)  
ans:b  
3
0.Which technology provides the flexibility to swap between XML processors with no application  
code changes?  
a. JAAS  
b. SAX  
c. XSLT  
d. JAXP  
ans:d  
1
.How to declare element with minimum one occurrence?  
a.<! ELEMENT element-name(element-content+)>  
b.<! ELEMENT element-name(element-content+)!>  
c.<! ELEMENT element-name(element-content)!>  
d.None of the listed options  
ans:a  
2
.Which of the following XML statement is valid?  
a.<message> if price<60</message>  
b.<message> if price lt 60 </message>  
c.<message> if price &lt; 60</message>  
d.None of the listed options  
ans:c  
3
.DTD stands for  
a.Document Type Definition  
b.Direct Type Definition  
c.Dynamic Type Definition  
d.None of these  
ans:a  
4
.Which of the following correctly defines use of DTD in XML development?  
a.DTD are used by parsers for validating the structure of the XML  
b.DTD are used as contract between two systems to interoperate.  
c.An Application can use the DTD to validate the XML structure it has received from external systems  
d.All the above  
ans:d  
5
.Any text that should not be parsed by the xml parser needs to declare as:  
I: PCDATA  
II: CDATA  
a.I  
b.II  
c.Both I and II  
d. None of the above  
ans:b  
6
.What is an XML instance  
a.An XML Document  
b.An XML element  
c.An XML attribute  
ans:a  
7
1
2
3
.What are the uses of XML parsers?  
.Parsing XML files and retrieving data from XML elements  
.Creating XML files programmatically  
.Used to direct conversion using an XSLT processor  
a.1&2  
b.2  
c.1&3  
d.2&3  
ans:a  
8
.Which parser reads small chunk of document at a time,parses it, generate an events and then  
reads another chunk of document?  
a.DOM  
b.SAX  
c.Both  
d.none  
ans:b  
9
.Which defines standard set of objects for creating XML's?  
a.SAX  
b.XML DOM  
c.XML  
d.SAX DOM  
ans:b  
1
0.Which type of parser is suitable,when applications is required to read data without modifying the  
content?  
a.DOM  
b.SAX  
c.Both  
d.None  
ans:b  
1
1.Which statement creates DocumentBuilder instance?  
a.DocumentBuilder b=new DocumentBuilder();  
b.DocumentBuilder b=new Builder();  
c.DocumentBuilder b=factory.new DocumentBuilder();  
d.None  
ans:c  
1
2.What does XSL stands for?  
a.Extensive Style sheet language  
b.Extensible Style Language  
c.Extensible Style Sheet Language  
d.None  
ans:c  
1
3.Which statement creates DocumentBuilderFactory instance?  
a.DocumentBuilderFactory f=new DocumentBuilderFactory();  
b.DocumentBuilderFactory f= BuilderFactory.newInstance();  
c.DocumentBuilderFactory f=DocumentBuilderFactory.newInstance();  
ans:c  
1
4.Which language is used for formatting XML documents?  
a.XSL  
b.XSLT  
c.XSL-FO  
ans:c  
1
5.Which is used to transform XML document?  
a.Xpath  
b.XSLT  
c.XML  
d.XSL  
ans:b  
1
1
2
3
6.What are the two common exceptions in JAXP?  
.ParserConfigurationException  
.FactoryConfigurationException  
.FactoryConfigurationError  
a.1&2  
b.3  
c.1&3  
d.1  
ans:c  
1
7.JAXP Stands for  
a.Java API eXtensive processing  
b.Java API eXtensible Processing  
c.Java API for XML Processing  
d.Java API for XML Parsing  
ans:c  
1
8.In which package JAXP related API's are available?  
a.javax.xml.parsers.*;  
b.javax.xml.*;  
c.javax.parsers.xml.*;  
ans:a  
1
9.Which complex type specifies that the elements should always be in the order specified?  
a.<xs:complexType name="CountrInfo">  
<xs:all>  
<xs:element name="countryName" type="xs:string"/>  
<xs:element name="states" type="xs:integer"/></xs:all>  
</xs:complexType>  
b.<xs:complexType name="CountrInfo"><xs:choice> <xs:element name="countryName"  
type="xs:string"/>  
<
xs:element name="states" type="xs:integer"/></xs:choice>  
/xs:complexType>  
c.<xs:complexType name="CountrInfo">  
<
<xs:sequence> <xs:element name="countryName" type="xs:string"/>  
<xs:element name="states" type="xs:integer"/>  
</xs:sequence></xs:complexType>  
ans:c  
2
0.Which statement specifies a constant value for a simple element?  
a.<xs:element name="CountryName" type="xs:string" constant="India"/>  
b.<xs:element name="CountryName" type="xs:string" fixed="India"/>  
c.<xs:element name="CountryName" type="xs:string" fixedvalue="India"/>  
ans:b  
2
1.Which complex type signifies that only one of the child elements can appear?  
a.<xs:complexType name="CountrInfo">  
<xs:all>  
<xs:element name="countryName" type="xs:string"/> <xs:element name="states"  
type="xs:integer"/></xs:all>  
/xs:complexType>  
b.<xs:complexType name="CountrInfo">  
<
<
<
<
<
xs:choice>  
xs:element name="countryName" type="xs:string"/>  
xs:element name="states" type="xs:integer"/>  
/xs:choice></xs:complexType>  
c.<xs:complexType name="CountrInfo">  
<
xs:sequence> <xs:element name="countryName" type="xs:string"/>  
xs:element name="states" type="xs:integer"/></xs:sequence></xs:complexType>  
ans:b  
<
2
2.Which method of DocumentBuilder is used to parse the xml file?  
a.parse  
b.read  
c.parseXML  
ans:a  
2
3.In XML DOM every XML element is treated as Node.  
a.True b.False  
ans:a  
2
4.Which method is used to get the element type of a XML document?  
a.node.getNodeType()  
b.node.getElementType()  
c.node.getType()  
ans:a  
2
5.Which statement is true?  
a.All XML elements must be lower case  
b.All XML documents must have a DTD  
c.All XML elements must be properly closed  
d.All the statements are true  
ans:c  
2
6.Which statement is NOT true?  
a.White-space is not preserved in XML  
b.XML documents must have a root tag  
c.XML tags are case sensitive  
d.XML elements must be properly nested  
ans:a  
2
7.XML elements cannot be empty  
a.False b.True  
ans:a  
2
8.Which is not a correct name for an XML element?  
a.<1dollar>  
b.<h1>  
c.<Note>  
d.All 3 names are incorrect  
ans:a  
2
8.For the XML parser to ignore a certain section of your XML document, which syntax is correct?  
a.![CDATA[ Text to be ignored ]]>  
b.<CDATA> Text to be ignored </CDATA>  
c.<xml:CDATA[ Text to be ignored ]>  
d.<PCDATA> Text to be ignored </PCDATA>  
ans:a  
2
9.What are XML entities used for?  
a.Entities define shortcuts to standard text or special characters bEntities define shortcuts to  
standard elements  
c.Entities define shortcuts to standard attributes  
ans:a  
3
0. Which XML DOM object represents a node in the node tree?  
a.The node object  
b.The nodeList object  
c.The document object  
ans:a  
1
1
2
3
4
.Which of following statements is/are False?  
. XML overcomes the limitations in HTML to support a structured way of organizing content.  
. XML specification is not case sensitive while HTML specification is case sensitive.  
. XML supports user defined tags while HTML uses pre-defined tags.  
. XML tags need not be closed while HTML tags must be closed.  
a.2 only  
b.1 only  
c.2 and 4  
d.3 and 4  
ans:c  
2
.Consider an XML file called intro.xml and a document type defintion (DTD) file intro.dtd as follows:  
intro.xml  
<
<
<
<
<
?xml version = "1.0"?>  
!DOCTYPE myMessage SYSTEM "intro.dtd"›  
myMessage>  
message>Welcome to XML</message>  
/myMessage>  
intro.dtd  
<
! ELEMENT myMessage (message)>  
! ELEMENT message (#PCDATA)>  
<
A validating parser will classify intro.xml as  
a.Well-formed and validated  
b.Well-formed but not validated  
c.Validated but not well-formed  
ans:a  
3
.Given below is an excerpt of an xml specification.  
Book>  
<
<
<
<
<
<
<
<
<
title> GATE 2005 </title>  
type value = "BROCHURE"/>  
accno>10237623786</accno>  
/Book>  
Book>  
type value = "FICTION"/>  
accno>0024154807</accno>  
/Book>  
Given below are several possible excerpts from "library.dtd". For which excerpt would the above  
specification be valid?  
a.<!ELEMENT Book (title+, type, accno)>  
<
!ELEMENT title (#PCDATA)>  
!ELEMENT type EMPTY>  
<
<!ATTLIST type value (BROCHURE/FICTION/TECHNICAL)> <!ELEMENT accno (#PCDATA)>  
b.  
<
!ELEMENT Book (title?, type, accno)>  
!ELEMENT title (#PCDATA)> <!ELEMENT type ATTLIST> <!ATTLIST type value  
<
(BROCHURE/FICTION/TECHNICAL)> <!ATTLIST accno value (#PCDATA)>  
c.  
<
!ELEMENT Book (title*, type, accno)>  
!ELEMENT title (#PCDATA)> <!ELEMENT type ATTLIST> <!ATTLIST type value  
<
(BROCHURE/FICTION/TECHNICAL)> <!ELEMENT accno (#PCDATA)>  
d.  
<
!ELEMENT Book (title?, type, accno)>  
!ELEMENT title (#PCDATA)> <!ELEMENT type EMPTY> <!ATTLIST type value  
<
(BROCHURE/FICTION/TECHNICAL)> <!ELEMENT accno (#PCDATA)>  
ans:a  
4
.Which of the following is TRUE only of XML but NOT HTML?  
a.It is derived from SGML  
b.It describes content and layout  
c.It allows user defined tags  
d.It is restricted only to be used with web browser  
ans:a,c  
5
.Which of the following statements are true with reference to the way of describing XML data?  
(
a)XML uses DTD to describe the data  
b)XML uses XSL to describe the data (c)  
(
XML uses a description node to describe the data Codes:  
a.(a) only  
b.(b) only  
c.(a) and (b)  
d.(a) and (c)  
ans:d  
6
.In XML we can specify the frequency of an element by using the symbols:  
a.+ * !  
b.# * !  
c.+* ?  
d.-*?  
ans:c  
7
.The definitions in an XML document are said to be __________ when the tagging system and  
definitions in the DTD are all in compliance.  
a.well-formed  
b.reasonable  
c.valid  
ans:c  
8
.The behaviour of the document elements in XML can be defined by  
a.Using document object  
b.Registering appropriate event handlers  
c.Using element object  
d.All of the above  
ans:b  
9
. Which is a valid XML comment?  
a.<!It is comment section >  
b.<!It is comment section >  
c.<!It is comment section>  
d.<!It is comment section !>  
ans:b  
1
0.An XML element can contain  
a.text  
b.attributes  
c.other elements  
d. mix of the above  
ans:d  
1
1.In XML, you can indicate an empty element like this:  
a.<element></element>  
b.<element/>  
c.a and b  
d.none  
ans:c  
1
2.XML namespaces avoid element naming conflict.  
a.True b.False  
ans:a  
1
3.What is true about XML Schema?  
a. It is used to describe and validate the structure and the content of XML data.  
b. XML schema defines the elements, attributes and data types.  
c. It is similar to a database schema that describes the data in a database.  
d. All of the above  
ans:d  
1
4.How an element can be defined within an XSD?  
a. <xs:element name = "x" type = "y"/>  
b. <?xs:element name = "x" type = "y"/>  
c. <xs:element name = "x" type = "y">  
d. </xs:element name = "x" type = "y"/>  
ans:a  
1
5._______ element is used only in the context of the text.  
a. Complex Type  
b. Simple type  
c. Global Types  
d. All of the above  
ans:b  
1
6.Which of the following are correct predefined simple types?  
a. xs:integer  
b. xs:char  
c. xs:float  
d. xs:bool  
ans:a  
1
7.Attributes have _______ property.  
a. name  
b. type  
c. Both A and B  
d. None of the above  
ans:c  
1
8.Simple type Built into Schema "data" represent a date in?  
a. MM-DD-YY  
b. DD-MM-YYYY  
c. YY-MM-DD  
d. YYYY-MM-DD  
ans:d  
1
9. XML uses the features of  
a.HTML  
b.XHTML  
c.VML  
d.SGML  
ans:d  
2
0.What are the parsers supported in XML?  
a.non validating and validating  
b.well documented  
c.well formed  
d.none of the above  
ans:a  
2
1.Which of the following strings is a correct XML name?  
a._myElement  
b.my Element  
c.#myElement  
d.None of the above  
ans:a  
2
2.Which of the following are well formed XML fragments?  
a.< myElement myAttribute="someValue’/>  
b.< myElement myAttribute=someValue/>  
c.< myElement myAttribute=’someValue’>  
d.< myElement myAttribute="someValue"/>  
ans:d  
2
3.Any XML must have:-  
a.Closing tag  
b.Root element  
c.Nested child  
d.both a and b  
ans:d  
2
4.How to specify the attributes with multiple values?  
a.< myElement myAttribute="value1" myAttribute="value2"/>  
b.< myElement myAttribute="value1 value2"/>  
c.attributes cannot have multiple values  
d.< myElement myAttribute="value1, value2"/>  
ans:c  
2
5.In terms of performance, which of the following parsers are more suitable?  
a.DOM  
b.SAX  
ans:b  
2
6.Is it easier to process XML than HTML?  
a.No  
b.Yes  
c.Sometimes  
d.Can’t say  
ans:b  
2
7. In XML, what is identified by a URI reference?  
a.XML namespace  
b.XSLT  
c.Schema  
d.DLT  
ans:a  
2
<
8. An element is declared as ANY in the DTD as  
!ELEMENT BODY ANY>. Which are all valid element declaration?  
a.<BODY> sometext</BODY>  
b.<BODY>  
<elements>  
<elements>  
</BODY>  
c.<BODY>  
sometext  
<elements>  
<elements>  
</BODY>  
d.All are valid  
ans:d  
2
<
9.An element is declared as  
!ELEMENT test ( sample +, conclusion )> in DTD. Which element is valid in XML document?  
a.<test>  
<sample>……..</sample>  
<sample>……..</sample>  
<conclusion>…</conclusion>  
</test>  
b.<test>  
<conclusion>…</conclusion>  
</test>  
c.<test>  
<sample>……..</sample>  
<conclusion>…</conclusion>  
</test>  
d.<test>  
<conclusion>…</conclusion>  
<sample>……..</sample>  
</test>  
ans:a,c  
3
<
<
0.What is the meaning of this declaration in DTD?  
!ELEMENT Student ( name, age)>  
!ATTLIST Student no CDATA #REQUIRED >  
a.Student element should have two attributes name and age  
b.Student element should not have any CDATA  
c.Student element should have an attribute no  
d.Student element should have name and age as child elements,attribute no is mandatory  
ans:d  
3
1. Which of the following statements are true?  
a.DOM is event based and SAX is object based  
b.DOM is object based and SAX is event based  
c.Both are object based  
d.Both are event based  
ans:b  
3
1
2
2. Which of the following statemetns are true?  
.org.w3c.dom defines Document class (a DOM) as well as classes for all the components of a DOM  
.org.xml.sax defines the basic SAX APIs.  
3
.javax.xml.parsers is the JAXP APIs, which provide a common interface for different vendors' SAX  
and DOM parsers.  
a.1 and 2  
b.2 and 3  
c.1 and 3  
d. All are true  
ans:d  
3
1
3. State which of the following statements are true.  
.A resource class is a Java class that uses JAX-RS annotations to implement a corresponding Web  
resource.  
2
.Resource classes are POJOs that have at least one method annotated with @Path or a request  
method designator.  
a. 1 is true and 2 is false  
b. 2 is true and 1 is false  
c. Both are true  
d. Both are false  
ans:c  
3
4.Which annotation is used to extract the value of a URI template parameter?  
a.@QueryParam  
b.@FormParam  
c.@PathParam  
d.@HeaderParam  
ans:c  
3
5.Only public methods may be exposed as resource methods.State True/False.  
a.True b. False  
ans:a  
3
6.Conversion between an entity body and a Java type is the responsibility of  
a.Entity  
b.EntityProvider  
c.Resource class  
d.None  
ans:b  
3
1
7.State whether the following statements are true/false.  
.The MessageBodyReader interface defines the contract between the JAX-RS runtime and  
components that provide mapping services from representations to a corresponding Java type.  
2
.The MessageBodyWriter interface defines the contract between the JAX-RS runtime and  
components that provide mapping services from a Java type to a representation.  
a.1 only  
b.2 only  
c.1 and 2 are true  
d.1 and 2 are false  
ans:c  
3
8.What is the status code returned by the server for bad request?  
a.400  
b.401  
c.403  
d.404  
ans:a  
3
9.What is XSRF/CSRF?  
a.Cross Site Response Forgery  
b.Cross Site Request Forgery  
c.Cross Site Rest Forgery  
ans:b  
4
0.Entities can have hyperlinks.  
a. True b.False  
ans:a  
4
1.The URI template for a resource method is given as follows:  
http://example.com/{name1}/{name2}/. What are the valid requests that can be send from client?  
a.http://example.com/jay/gatsby/  
b.http://example.com/jay/  
c.http://example.com/*  
ans:a  
4
2.Which of the following are valid URI templates?  
a.http://example.com/{question}/{question}/{question}/  
b.http://example.com/maps/{location}  
c.http://example.com/{name3}/home/  
d.All are valid  
e.None of the above are valid  
ans:d  
4
3.Which of the following is valid JSON declaration to represent a user with attributes id,name and  
profession?  
a.{  
"
"
"
id":1,  
name":"Mahesh",  
profession":"Teacher"  
}
b.[  
"
id":1,  
"
name":"Mahesh",  
profession":"Teacher"  
"
]
c.{  
id:1,  
name:"Mahesh",  
profession:"Teacher"  
}
d.{  
"
id":"1",  
"
name":"Mahesh",  
profession":"Teacher"  
"
}
ans:a  
4
4.SOAP is not tied to any specific transport protocol.  
a. True b.False  
ans:a  
4
5.XML-RPC is the simplest XML-based protocol for exchanging information between computers.  
a.True b. False  
ans:a  
4
6.You are going to develop Stock market web service which will be consumed by other companies.  
Java team from your company want to re-use your web service code as soon as possible. Which  
approach you will follow in this case?  
A. Top down (contract first)  
B. Meet in the middle  
C. Bottom up (code first)  
D. None of the above  
ans:c  
4
7.Our company want to create application in which servlet will be exposed as WS endpoint. What  
we will require among following? (any 3)  
A. Application needs to be packaged as JAR file.  
B. Application needs to be packaged as WAR file.  
C. web.xml is required.  
D. webservice.xml is required.  
E. WEB-INF directory is required.  
F. META-INF directory is required.  
ans:b c e  
4
8.Please select incorrect statement among following statements.  
a.Confidentiality - encrypting of SOAP messages  
b.Integrity - signing of SOAP messages  
c. Authentication - attach security tokens to SOAP messages  
d. Non-repudiation - signing of SOAP messages  
e. Authorization - attach identity tokens to SOAP message  
ans:e  
4
9.What are three benefits of using SSL to connect to a Web service ? (any 3)  
a. The server is assured of the client's identity if the client issues the certificate.  
b. The client is assured of the server's identity.  
c. Message integrity is preserved between the client and the server.  
d. The communication between the client and the server is still logged.  
e. The communication between the client and the server is encrypted.  
f. Using SSL over HTTP incurs less overhead than HTTPS.  
ans:a c e  
5
0.Which of the following methods are not Idempotent?  
a.Get  
b.Post  
c.Put  
d.Delete  
ans:b  
5
1.Which of these are not the elements WSDL ?  
a.Types  
b.Port Type  
c.Service  
d.destination  
ans:d  
5
2. Which of these test do use an HTTP POST and will send the XML response.  
a.<?xml version="1.0" encoding="utf-8" ?>  
short xmlns="http://tempuri.org/">38</short>  
b.<?xml ?>  
short xmlns="http://tempuri.org/">38</short>  
c.<?xml version="1.0" encoding="utf-8" ?>  
short xmlns="http://tempuri.org/">38  
<
<
<
d.<short xmlns="http://tempuri.org/">38</short>  
ans:a  
5
3.The Web services can not offer the application components like:  
a.currency conversion  
b.weather reports  
c.language translation  
d.web browsers  
ans:d  
5
4.The XML provides the ________ in which you can write the specialized languages to express the  
complex interactions between the clients and the services or between the components of a  
composite service.  
a.language  
b.metalanguage  
c.meta  
d.services  
ans:b  
5
5.Schema is an _____ based alternative for DTD.  
a.XHTML  
b.XSLT  
c.XSL  
d.XML  
ans:d  
5
6.XSLT is:  
a.Extensible Stylesheet Language Translators  
b.Extended Stylesheet Language Transformation  
c.Extensible Stylesheet Language Transformation  
d.Extensible Style Language Transformation  
ans:c  
5
7.What is a web service?  
a.A standard way of integrating web-based applications  
b.One type of service that can be part of a Service Oriented Architecture  
c.Programmable XML-based service  
d.All of the above  
ans: d  
5
8. Service Transport, XML Messaging, Service Description and Service Discovery are four layers of  
a.web service implementing client components  
b.web service protocol stack  
c.web service supporting repository  
d.web service supporting request and response components  
ans:b  
5
9.Web Services attempts to describe architecture based on  
a.Representational State Transfer (REST)  
b.Remote Procedure Calls  
c.Reusable Application Components  
d.None of the above  
ans:a  
6
0.Which of the following is an open source SOAP server and client?  
a.Apache ANT  
b.Apache Tomcat  
c.Jakarta Struts  
d.Apache Axis  
ans:b  
1
._______________ is used to convert your application into Web-Application.  
a. Java Service  
b.Browser Action  
c. Web Services  
d. Struts Services  
ans:-c  
2
.Web Services are _______________.  
a.Application Designing Tool  
b.Application IDE  
c.Application Components  
d.None of these  
ans:-c  
3
.The basic Web Services platform is combination of _____ and _______.  
a.CSS + JAVA  
b.CSS + HTTP  
c.XML + HTTP  
d.XML + HTML  
ans:-c  
4
.Web services communicate using __________.  
a.Open protocols  
b.Open-Close protocols  
c.Close protocols  
d.None of these  
ans:-a  
5
.Web services are self-contained and self-describing.  
a.False b.True  
ans:-b  
6
.Web services can be discovered using ________.  
a.UDDII b.UDDI c.UDII d.UDDDI  
ans:-b  
7
.__________ is the basis for Web services.  
a.PHP  
b.CSS  
c.CGI  
d.XML  
ans:-d  
8
.Which of the following is considered as Web Service Platform Elements ?  
a.SOAP  
b.UDDI  
c.WSDL  
d.All of these  
ans:-d  
9
.WSDL Stands for ______________________.  
a.Web Services Description Language  
b.Web Services Design Language  
c.Web Services Development Language  
d.None of these  
ans:-a  
1
0.UDDI Stands for ______________________.  
a.Universal Development, Design and Integration  
b.Universal Description, Discovery and Integration  
c.Universal Description, Development and Integration  
ans:-b  
1
1.Acronymn of SOAP is ______________.  
a.Simplified Object Arbitary Protocol  
b.Secure Object Access Protocol  
c.Simple Object Access Protocol  
d.None of these  
ans:-c  
1
2.Web-services were developed in order to interact _____________ .  
a.Server  
b.Browsers  
c.Different platforms  
ans:-c  
1
3.Web services use ________ to code and to decode data.  
a.XML  
b.SOAP  
c.UDDI  
d.None of these  
ans:-a  
1
4.Web Services is used to -  
a.Connect existing software  
b.Reuse application-components.  
c.Solve the interoperability problem  
d. All of these  
ans:-d  
1
5.SOAP is an _________ to let applications exchange information over HTTP.  
a.XML-based protocol  
b.JAVA-based protocol  
c.PHP-based protocol  
d.NET-based protocol  
ans:-a  
1
6.SOAP is a _________.  
a.Protocol  
b.Markup  
c.Carrier  
d.Language  
ans:-a  
1
7.SOAP is platform ___________.  
a.Dependent  
b.Independent  
c.None  
ans:-b  
1
8.SOAP is a format for sending messages and is also called as __________.  
a.Data Transfer protocol  
b.Communication protocol  
c.Network protocol  
d.None of these  
ans:-  
1
9.SOAP is a W3C standard ! (True / False)  
a.False b.True  
ans:-b  
2
0._________ is a directory for storing information about web services.  
a.SOAP  
b.CGI  
c.UDDI  
d.HTTP  
ans:-c  
2
1.XML digital signatures provides  
a.Authentication  
b.Authorization  
c.Confidentiality  
d.Integrity  
ans:-c  
2
2.What is RPC?  
a.Remote Process control  
b.Remote Procedure call  
c.Rempte Protocol control  
ans:-b  
2
2.What is SSL?  
a.Secure Socket Layer  
b.Secured Socket Layer  
c.Standard Secured Layer  
d.Standard Socket Layer  
ans:-a  
2
3.Select the communication channel not used in ws  
a.HTTP/POST  
b.MIME  
c.SOAP  
d.HTTP/GET  
ans:-b  
2
4.What is not a part of soap message?  
a.Soap body  
b.Soap envelope  
c.Soap headers  
d.Soap footer  
ans:-d  
2
5.Which of the following component of HTTP response contains metadata for the HTTP Response  
message as key-value pairs?  
a. Status/Response Code  
b. HTTP Version  
c. Response Header  
d. Response Body  
ans:-c  
2
6. Which of the following HTTP method should be read only in nature?  
a.GET  
b.DELETE  
c.POST  
d.PUT  
ans:-a  
2
7. Which of the following directive of Cache Control Header of HTTP response indicates that  
resource is not cachable?  
a.Public  
b.Private  
c.no-cache/no-store  
d.max-age  
ans:-c  
2
8.Which of the following HTTP Status code means NO CONTENT, when response body is empty for  
example, a DELETE request?  
a. 200  
b. 201  
c. 204  
d. 304  
ans:-  
2
9.Which of the following annotation of JAX RS API is used to annotate a method used to  
create/update resource?  
a. @Path  
b. @GET  
c. @PUT  
d.@POST  
ans:-d  
3
0. RESTful web services make use of FTP protocol as a medium of communication between client  
and server.  
a.True b.False  
ans:-b  
3
1.Response Header - Contains metadata for the HTTP Response message as key-value pairs.  
a.True b.False  
ans:-a  
3
2.Which of the following layer in Web Service Protocol Stack is responsible for centralizing services  
into a common registry and providing easy publish/find centralizing services into a common registry  
and providing easy publish/find functionality?  
a.Service Transport  
b.XML Messaging  
c.Service Description  
d.Service Discovery  
ans:-d  
3
3.Annotation which allows the Jaxb2Marshaller marshaller to detect a class’s (i.e., object’s) fields.  
a. XmlRootElement  
b. XmlRoot  
c. NotNull  
d. None of the mentioned  
ans:-a  
3
4.Which of the following is correct about URI in RESTful web services?  
a. Each resource in REST architecture is identified by its URI  
b. Purpose of an URI is to locate a resource(s) on the server hosting the web service  
c. Both of the above  
d. None of the above  
ans:-  
3
5. Annotation added as an input parameter to the handler method  
a. PathParam  
b. Path  
c PathLocale  
d. None of the mentioned  
ans:-d  
3
6. Each resource in REST architecture is identified by its URI.  
a.True b.False  
ans:-a  
3
7. Explain features of XML-RPC?  
a. RPCs are performed using simple XML language  
b. XML encoded Requests are sent via HTTP POST  
c. XML Response is embedded in HTTP response  
d. All of the above  
ans:-d  
3
8.XML tag which represents information related to a REST service’s request.  
a. Result  
b. Title  
c. a&b  
d. None  
ans:-c  
3
9.Some common Resources representations used in REST are  
a.JSON  
b.YAML  
c.XML  
d.HTML  
e. All the above  
ans:-e  
4
0.RESTful web services ?  
a. Defines its own security.  
b. Inherits security measures from the underlying transport.  
c. Both of the above  
d. None of the above  
ans:-b  
4
1.What is/are the advantages of RESTful Web Services.?  
a. Language and Platform independent  
b. REST can use SOAP  
c. Permits different data format  
d. All of the above  
ans:-d  
4
2.Which of the following annotation of JAX RS API states the HTTP Response generated by web  
service?  
a. @DELETE  
b. @HEAD  
c. @Produces  
d. @Consumes  
ans:-c  
4
3. _______________ is the java API for RESTful web services.?  
A. JAX-RS  
B. JAX-WS  
C. Both of the above  
D. None of the above  
ans:-a  
4
4. Select programming languages supported by Web Services  
a. c++  
b. Java  
c. Python  
d. C  
e. All of the above  
ans:-e  
4
5.Which two statements are true about the Web services? (any 2)  
a. SOAP messages are compressed during transport to reduce size of payload.  
b. You have to implement session tracking via HTTP cookies.  
c. The WSDL defines services as collections of network endpoints.  
d. All data shared between Java and non-Java components must be in XML format.  
e. Data interchange is done via in XML.  
ans:-c,e  
4
6.We have a Web Service that can respond with a Street name when receiving a House number.  
This service will be used on several mobile devices and size of payload should be small to consume  
less bandwidth. Which technologies can provide the best solution for this requirement? (any 3)  
a. XML  
b. JSON  
c. JAX-WS  
d. JAX-RS  
e. HTTP  
ans:-b,d,e  
4
7.Given a following code snippet of the service can you tell what is the name of the operation in  
WSDL file?  
@WebService(serviceName = "PayrollSystemService", name = "PayrollSystem", portName =  
"
PayrollSystemPort")  
public class PayrollSystem {  
public String getEmployeeDetails(Long empId) {  
return ""dummyDetails"";  
}
}
a. getEmployeeDetails  
b. getEmployeeDetailsOperation  
c. getEmployeeDetailsMethod  
d. getEmployeeDetailsWebMethod  
e. getEmployeeDetailsService  
ans:-a  
4
8. What is JAXB?  
a.Java API for XML Bean  
b.Java API for XML Binding  
c.Java API for XML Basics  
ans:-b  
4
9.Response entity is defined in which package?  
a.javax.ws.rs.core.Response  
b.javax.ws.rs.Response  
c.javax.ws.Response  
ans:-a  
5
0.Which is the discovery protocol?  
a.SOAP  
b.HTTP  
c.UDDI  
d.WSDL  
ans:-c  
1
.Our company wants to create JAX-WS Web service client for weather forcast service. This weather  
forcast service is implemented in C++. You have given a WSDL file for service. What is correct  
statement to be able to create WS client from WSDL.  
a. Use JAXP to parse and generate the java classes from WSDL. Then create Service Endpoint  
Interface(SEI) from factory classes. Then use SEI to call WS.  
b. Use wsgen to generate SEI from WSDL and then invoke SEI's methods to call WS.  
c. Use wsimport to generate SEI from WSDL and then invoke SEI's methods to call WS.  
d. We can not consume a web service created in C++ on java.  
ans:c  
2
.What is an best way of the handling of application exceptions thrown by a JAX-WS service  
endpoint?  
a. Exceptions should be mapped to faults in WSDL.  
b. Exceptions are NOT handled by JAX-WS clients.  
c. Exceptions are always propagated to JAX-WS clients as RemoteExceptions.  
d. Exceptions are always propagated to JAX-WS clients as WebServiceExceptions.  
e. Exceptions are always propagated to JAX-WS clients as SOAPFaultExceptions.  
ans:a  
3
.What is the correct definition of WSDL's port element?  
a. Contains data type definitions using type system.  
b. Description of an action supported by the service.  
c. Set of operations supported by one or more Endpoints.  
d. A single endpoint defined as a combination of a binding and a network address.  
ans:d  
4
.Which two statements are true about the Web services? (any 2)  
a. SOAP messages are compressed during transport to reduce size of payload.  
b. You have to implement session tracking via HTTP cookies.  
c. The WSDL defines services as collections of network endpoints.  
d. Data interchange is done via XML.  
ans:c,d  
5
.We want to develop a Web Service and after developing we understood result processing can take  
a long time to finish. So we decided to convert it to asynchronous method invocations. Is it possible  
to convert our synchronous Web Service to an asynchronous Web Service using SOAP?  
a. True b.False  
ans:a  
6
.Which of the following code snippet matches to this WSDL portType element?  
portType name="ElementsTableImpl">  
<
<operation name="getTable">  
<
<
<
input message="tns:getTable" />  
output message="tns:getTableResponse" />  
fault message="tns:WsException" name="WsException" />  
</operation>  
</portType>  
a.@WebService  
public class ElementsTableImpl {  
public SimpleElementsTable getElementsTable(Integer number) throws WsException {  
SimpleElementsTable table = new SimpleElementsTable(number);  
return table;  
}
}
b.@WebService  
public class ElementsTableImpl {  
public SimpleElementsTable getTable(Integer number) {  
SimpleElementsTable table = new SimpleElementsTable(number);  
return table;  
}
}
c.@WebService (endpointInterface="ElementsTableService")  
public class ElementsTableImpl {  
public SimpleElementsTable getTable(Integer number) throws WsException {  
SimpleElementsTable table = new SimpleElementsTable(number);  
return table;  
}
}
d.@WebService  
public class ElementsTableImpl {  
public SimpleElementsTable getTable(Integer number) throws WsException {  
SimpleElementsTable table = new SimpleElementsTable(number);  
return table;  
}
}
ans:d  
7
.Select HTTP methods associate with SOAP Web service.  
a. Put  
b. Post  
c. Get  
d. Delete  
ans:b  
8
.Select the operations supported by Web Services.  
a. One way (Request only)  
b. Two way (Request - Response)  
c. Solicit-Response (Server push message and client responds)  
d. Notification (Request/message from server to client)  
e. All of the above  
ans:e  
9
.Select statements which are true for SOAP. (any 3)  
a. SOAP is specification for exchanging structured information  
b. SOAP relies on other transport protocols like http, ftp for data trasmission  
c. SOAP uses xml to format data  
d. SOAP uses json to format data  
ans:a,b,c  
1
0.There are two approaches to develop a web service, depending on whether you define the  
contract first or last.  
a) True  
b) False  
ans:a  
1
1.In contrast, the contract-first approach encourages you to think of the service contract first in  
terms of :-  
a.XML  
b.XML Schema(.xsd)  
c.WSDL  
d.All of the mentioned  
ans:d  
1
2.To send objects across the wire, beans need to be encoded using the Java Architecture for XML  
Binding (JAXB).  
a.True  
b.False  
ans:a  
1
3. If you are deploying into a Java EE 5 (or better) container, you may simply create a bean that is  
annotated with:-  
a. javax.jws.WebService  
b. javax.jws.WebServiceProvider  
c. a&b  
d. none of these  
ans:c  
1
4.Tomcat doesn’t support JAX-WS by itself.  
a.True  
b. False  
ans:a  
1
5. Which of the following role of web service architecture implements the service and makes it  
available on the Internet?  
a. Service Provider  
b. Service Requestor  
c. Service Registry  
d. None of the above  
ans:a  
1
6.The simpler approach of implementing a web service is named as  
a. Entity State Transfer  
b. JavaScript Entity Notation  
c. Representation State Transfer  
d. JavaScript Object Notation  
ans:c  
1
7.Coding and decoding, and transporting the data is performed by  
a. XML and UDDI  
b. XML and SOAP  
c. HTML and HTTP  
d. HTML and SOAP  
ans:b  
1
8.Web Services are  
a.Loosely Coupled  
b.Tightly Coupled  
c.Either Loosely or Tightly Coupled  
d.Neither Loosely nor Tightly Coupled  
ans:a  
1
9.Which of the following is true about Web services?  
a.Web services are open standard (XML, SOAP, HTTP etc.) based Web applications.  
b.Web services interact with other web applications for the purpose of exchanging data.  
c.Web Services can convert your existing applications into Web-applications.  
d.All of the above.  
ans:d  
2
0.Which of the following is correct statement about Synchronicity?  
a.Synchronicity refers to the binding of the client to the execution of the service.  
b.In synchronous invocations, the client blocks and waits for the service to complete its operation  
before continuing.  
c.Asynchronous operations allow a client to invoke a service and then execute other functions.  
d.All of the above  
ans:da  
2
1.How request is sent in XML-RPC?  
a.Requests are encoded in XML and sent via HTTP POST.  
b.Requests are encoded in XML and sent via HTTP GET.  
c.Both of the above.  
d.None of the above.  
ans:  
2
2.Which of the following is a security issue with web services?  
a.Confidentiality  
b.Authentication  
c.Network Security  
d.All of the above  
ans:d  
2
3.URL means ________.  
a.Address of the resource on the web  
b.Term used to describe Website  
c.Term used to get online program  
d.None of these  
ans:a  
2
4. Rest is stateful.  
a.True b.False  
ans:b  
2
5.What is the full form of JSON?  
a.JavaScript Object Native  
b.JavaScript Object Notation  
c.JavaScript Object Negation  
d.Java Object Notation  
ans:b  
2
6. The Service requestor provides a central place where developers can publish new services or find  
existing ones.  
a.True  
b.False  
ans:b  
2
7. Which of the following is correctly defining loosely coupled architecture of web service?  
a. A consumer of a web service is not tied to that web service directly.  
b. The web service interface can change over time without compromising the client's ability to  
interact with the service.  
c.Adopting a loosely coupled architecture tends to make software systems more manageable and  
allows simpler integration between different systems.  
d. All of the above.  
ans:d  
2
8. Which of the following is correct about UDDI?  
a. UDDI is an XML-based standard for describing, publishing, and finding web services.  
b.UDDI is a specification for a distributed registry of web services.  
c.UDDI is platform independent, open framework.  
d. All of the above.  
ans:d  
2
9.Which of the following is true about behavioral characteristics of web services?  
a. Asynchronous clients retrieve their result at a later point in time, while synchronous clients  
receive their result when the service has completed.  
b. A web service supports RPC by providing services of its own, equivalent to those of a traditional  
component, or by translating incoming invocations into an invocation of an EJB or a .NET  
component.  
c.Web services support the transparent exchange of documents to facilitate business integration.  
d.All of the above.  
ans:d  
3
0.Which of the following is correct about XML Messaging layer in Web Service Protocol Stack?  
a.This layer is responsible for encoding messages in a common XML format so that messages can be  
understood at either end.  
b.Currently, this layer includes XML-RPC and SOAP.  
c.Both of the above.  
d.None of the above.  
ans:c  
WEB SERVICES MOCK TEST  
Copyright © tutorialspoint.com  
This section presents you various set of Mock Tests related to Web Services Framework. You can  
download these sample mock tests at your local machine and solve offline at your convenience.  
Every mock test is supplied with a mock test key to let you verify the final score and grade yourself.  
WEB SERVICES MOCK TEST III  
Q 1 - Which of the following is correct about WSDL?  
A - WSDL is an integral part of UDDI, an XML-based worldwide business registry.  
B - WSDL is the language that UDDI uses.  
C - Both of the above.  
D - None of the above.  
Q 2 - What UDDI stands for?  
A - Uniform Description, Discovery, and Integration  
B - Universal Description, Discovery, and Integration  
C - Uniform Discovery, Description, and Integration  
D - Uniform Discovery, Delivery, and Integration  
Q 3 - Which of the following is correct about UDDI?  
A - UDDI is an XML-based standard for describing, publishing, and finding web services.  
B - UDDI is a specification for a distributed registry of web services.  
C - UDDI is platform independent, open framework.  
D - All of the above.  
Q 4 - Which of the following is correct about UDDI?  
A - UDDI can communicate via SOAP, CORBA, and Java RMI Protocol.  
B - UDDI uses WSDL to describe interfaces to web services.  
C - Both of the above.  
D - None of the above.  
Q 5 - Which of the following is correct about UDDI?  
A - UDDI is seen with SOAP and WSDL as one of the three foundation standards of web services.  
B - UDDI is an open industry initiative enabling businesses to discover each other and define how  
they interact over the Internet.  
C - Both of the above.  
D - None of the above.  
Q 6 - Which of the following is a security issue with web services?  
A - Confidentiality  
B - Authentication  
C - Network Security  
D - All of the above.  
Q 7 - Which of the following component of Web service describes interfaces to web  
services?  
A - UDDI  
B - WSDL  
C - SOAP  
D - None of the above.  
Q 8 - Which of the following language UDDI uses?  
A - XML  
B - WSDL  
C - SOAP  
D - None of the above.  
Q 9 - Is XML-RPC is platform-dependent?  
A - true  
B - false  
Q 10 - Is XML-RPC is language-dependent?  
A - true  
B - false  
Q 11 - Web services interact with other web applications for the purpose of  
exchanging data.  
A - true  
B - false  
Q 12 - Web Services can convert your existing applications into Web-applications.  
A - true  
B - false  
Q 13 - Web Services can be available over the Internet or private intranet networks.  
A - false  
B - true  
Q 14 - Web Services is not tied to any one operating system or programming  
language.  
A - false  
B - true  
Q 15 - Web Services is self-describing via a common XML grammar.  
A - true  
B - false  
Q 16 - Web Services is discoverable via a simple find mechanism.  
A - true  
B - false  
Q 17 - A web service enables communication among various applications by using  
open standards such as HTML, XML, WSDL, and SOAP.  
A - false  
B - true  
Q 18 - You can build a Java-based web service on Solaris that is accessible from your  
Visual Basic program that runs on Windows.  
A - true  
B - false  
Q 19 - You can also use C# to build new web services on Windows that can be invoked  
from your web application that is based on JavaServer Pages JSP and runs on Linux.  
A - true  
B - false  
Q 20 - Web services allow various applications to talk to each other and share data  
and services among themselves.  
A - true  
B - false  
Q 21 - Web services are used to make the application platform and technology  
independent.  
A - false  
B - true  
Q 22 - A consumer of a web service is not tied to that web service directly.  
A - false  
B - true  
Q 23 - The web service interface can change over time without compromising the  
client's ability to interact with the service.  
A - false  
B - true  
Q 24 - Adopting a loosely coupled architecture tends to make software systems more  
manageable and allows simpler integration between different systems.  
A - true  
B - false  
Q 25 - A web services takes the help of XML to tag the data, format the data.  
A - true  
B - false  
Q 26 - A web service takes the help of XML to transfer a message.  
A - true  
B - false  
Q 27 - A web service takes the help of XML to describe the availability of service.  
A - true  
B - false  
Q 28 - A web services takes the help of SOAP to tag the data, format the data.  
A - true  
B - false  
Q 29 - A web service takes the help of SOAP to transfer a message.  
A - true  
B - false  
Q 30 - A web service takes the help of SOAP to describe the availability of service.  
A - true  
B - false  
Q 31 - A web services takes the help of WSDL to tag the data, format the data.  
A - true  
B - false  
Q 32 - A web service takes the help of WSDL to transfer a message.  
A - true  
B - false  
Q 33 - A web service takes the help of WSDL to describe the availability of service.  
A - true  
B - false  
Q 34 - The service provider implements the service and makes it available on the  
Internet.  
A - true  
B - false  
Q 35 - The Service Requestor implements the service and makes it available on the  
Internet.  
A - true  
B - false  
Q 36 - The Service Registry implements the service and makes it available on the  
Internet.  
A - true  
B - false  
Q 37 - The service requestor utilizes an existing web service by opening a network  
connection and sending an XML request.  
A - true  
B - false  
Q 38 - The service provider utilizes an existing web service by opening a network  
connection and sending an XML request.  
A - true  
B - false  
Q 39 - The service registry utilizes an existing web service by opening a network  
connection and sending an XML request.  
A - true  
B - false  
Q 40 - The Service registry provides a central place where developers can publish new  
services or find existing ones.  
A - true  
B - false  
Q 41 - The Service requestor provides a central place where developers can publish  
new services or find existing ones.  
A - true  
B - false  
Q 42 - The Service provider provides a central place where developers can publish new  
services or find existing ones.  
A - true  
B - false  
Q 43 - The XML Messaging layer is responsible for transporting messages between  
applications.  
A - true  
B - false  
Q 44 - Service Transport is responsible for encoding messages in a common XML  
format so that messages can be understood at either end.  
A - true  
B - false  
Q 45 - Service Description is responsible for describing the public interface to a  
specific web service.  
A - true  
B - false  
Q 46 - Service Discovery is responsible for centralizing services into a common  
registry and providing easy publish/find functionality.  
A - true  
B - false  
Q 47 - The Service Transport layer is responsible for transporting messages between  
applications.  
A - true  
B - false  
Q 48 - XML Messaging is responsible for encoding messages in a common XML format  
so that messages can be understood at either end.  
A - true  
B - false  
Q 49 - Service Discovery is responsible for describing the public interface to a specific  
web service.  
A - true  
B - false  
Q 50 - Service Description is responsible for centralizing services into a common  
registry and providing easy publish/find functionality.  
A - true  
B - false  
ANSWER SHEET  
Question Number Answer Key  
1
2
3
4
5
6
7
8
9
1
1
1
1
1
1
1
1
1
1
2
2
2
2
2
2
2
2
2
C
B
D
C
C
D
A
B
B
B
A
A
B
B
A
A
B
A
A
A
B
B
B
A
A
B
B
B
0
1
2
3
4
5
6
7
8
9
0
1
2
3
4
5
6
7
8
2
3
3
3
3
3
3
3
3
3
3
4
4
4
4
4
4
4
4
4
4
5
9
0
1
2
3
4
5
6
7
8
9
0
1
2
3
4
5
6
7
8
9
0
A
B
B
B
A
A
B
B
A
B
B
A
B
B
B
B
A
A
A
A
B
B
Loading [MathJax]/jax/output/HTML-CSS/jax.js  
WEB SERVICES MOCK TEST  
Copyright © tutorialspoint.com  
This section presents you various set of Mock Tests related to Web Services Framework. You can  
download these sample mock tests at your local machine and solve offline at your convenience.  
Every mock test is supplied with a mock test key to let you verify the final score and grade yourself.  
WEB SERVICES MOCK TEST I  
Q 1 - Which of the following is true about Web services?  
A - Web services are open standard XML, SOAP, HTTPetc. based Web applications.  
B - Web services interact with other web applications for the purpose of exchanging data.  
C - Web Services can convert your existing applications into Web-applications.  
D - All of the above.  
Q 2 - Which of the following is true about Web service?  
A - It is available over the Internet or private intranet networks.  
B - It uses a standardized XML messaging system.  
C - It is not tied to any one operating system or programming language.  
D - All of the above.  
Q 3 - Which of the following is true about Web service?  
A - It is self-describing via a common XML grammar.  
B - It is discoverable via a simple find mechanism.  
C - Both of the above.  
D - None of the above.  
Q 4 - Which of the following is true about Web service?  
A - A web service enables communication among various applications by using open standards  
such as HTML, XML, WSDL, and SOAP.  
B - You can build a Java-based web service on Solaris that is accessible from your Visual Basic  
program that runs on Windows.  
C - You can also use C# to build new web services on Windows that can be invoked from your  
web application that is based on JavaServer Pages JSP and runs on Linux.  
D - All of the above.  
Q 5 - Which of the following is a components of a Web Service architecture?  
A - SOAP  
B - UDDI  
C - WSDL  
D - All of the above.  
Q 6 - What is the purpose of XML in a web service?  
A - A web services takes the help of XML to tag the data, format the data.  
B - A web service takes the help of XML to transfer a message.  
C - A web service takes the help of XML to describe the availability of service.  
D - None of the above.  
Q 7 - What is the purpose of SOAP in a web service?  
A - A web services takes the help of SOAP to tag the data, format the data.  
B - A web service takes the help of SOAP to transfer a message.  
C - A web service takes the help of SOAP to describe the availability of service.  
D - None of the above.  
Q 8 - What is the purpose of WSDL in a web service?  
A - A web services takes the help of WSDL to tag the data, format the data.  
B - A web service takes the help of WSDL to transfer a message.  
C - A web service takes the help of WSDL to describe the availability of service.  
D - None of the above.  
Q 9 - Which of the following is a benefit of using a web service?  
A - Web services allows you to expose the functionality of your existing code over the network.  
Once it is exposed on the network, other application can use the functionality of your program.  
B - Web services allow various applications to talk to each other and share data and services  
among themselves.  
C - Web services use standardized industry standard protocol for the communication.  
D - All of the above.  
Q 10 - Which of the following is a benefit of using a web service?  
A - Web services use SOAP over HTTP protocol, so you can use your existing low-cost internet for  
implementing web services.  
B - All the four layers ServiceTransport, XMLMessaging, ServiceDescription, andServiceDiscoverylayers use well-  
defined protocols in the web services protocol stack.  
C - Both of the above.  
D - None of the above.  
Q 11 - Which of the following is correctly defining web service interoperability?  
A - Web services allow various applications to talk to each other and share data and services  
among themselves.  
B - Other applications can also use the web services.  
C - Web services are used to make the application platform and technology independent.  
D - All of the above.  
Q 12 - Which of the following is correctly defining loosely coupled architecture of web  
service?  
A - A consumer of a web service is not tied to that web service directly.  
B - The web service interface can change over time without compromising the client's ability to  
interact with the service.  
C - Adopting a loosely coupled architecture tends to make software systems more manageable  
and allows simpler integration between different systems.  
D - All of the above.  
Q 13 - Which of the following is true about Web Services RPC?  
A - Web services allow clients to invoke procedures, functions, and methods on remote objects  
using an XML-based protocol.  
B - Remote procedures expose input and output parameters that a web service must support.  
C - A web service supports RPC by providing services of its own, equivalent to those of a  
traditional component, or by translating incoming invocations into an invocation of an EJB or a  
.NET component.  
D - All of the above.  
Q 14 - Which of the following is true about behavioral characteristics of web services?  
A - Web Services uses XML at data representation and data transportation layers.  
B - A consumer of a web service is not tied to that web service directly.  
C - Businesses and the interfaces that they expose should be coarse-grained. Web services  
technology provides a natural way of defining coarse-grained services that access the right  
amount of business logic.  
D - All of the above.  
Q 15 - Which of the following is true about behavioral characteristics of web services?  
A - Asynchronous clients retrieve their result at a later point in time, while synchronous clients  
receive their result when the service has completed.  
B - A web service supports RPC by providing services of its own, equivalent to those of a  
traditional component, or by translating incoming invocations into an invocation of an EJB or a  
.NET component.  
C - Web services support the transparent exchange of documents to facilitate business  
integration.  
D - All of the above.  
Q 16 - Which of the following is the benefits of having XML based WEB services?  
A - Using XML eliminates any networking, operating system, or platform binding.  
B - Web Services based applications are highly interoperable application at their core level.  
C - Both of the above  
D - None of the above.  
Q 17 - Which of the following is the benefits of Web services being loosely coupled?  
A - The web service interface can change over time without compromising the client's ability to  
interact with the service.  
B - Adopting a loosely coupled architecture tends to make software systems more manageable  
and allows simpler integration between different systems.  
C - Both of the above  
D - None of the above.  
Q 18 - Which of the following is correct statement about Synchronicity?  
A - Synchronicity refers to the binding of the client to the execution of the service.  
B - In synchronous invocations, the client blocks and waits for the service to complete its  
operation before continuing.  
C - Asynchronous operations allow a client to invoke a service and then execute other functions.  
D - All of the above.  
Q 19 - Which of the following is not a core role in Web Service architecture?  
A - Service Provider  
B - Service Requestor  
C - Service Registry  
D - Service Locator  
Q 20 - Which of the following role of web service architecture implements the service  
and makes it available on the Internet?  
A - Service Provider  
B - Service Requestor  
C - Service Registry  
D - None of the above.  
Q 21 - Which of the following role of web service architecture utilizes an existing web  
service by opening a network connection and sending an XML request?  
A - Service Provider  
B - Service Requestor  
C - Service Registry  
D - None of the above.  
Q 22 - Which of the following role of web service architecture provides a central place  
where developers can publish new services or find existing ones?  
A - Service Provider  
B - Service Requestor  
C - Service Registry  
D - None of the above.  
Q 23 - Which of the following is not a core layer in Web Service Protocol Stack?  
A - Service Transport  
B - XML Messaging  
C - Service Description  
D - Service Locator  
Q 24 - Which of the following layer in Web Service Protocol Stack is responsible for  
transporting messages between applications?  
A - Service Transport  
B - XML Messaging  
C - Service Description  
D - Service Discovery  
Q 25 - Which of the following layer in Web Service Protocol Stack is responsible for  
encoding messages in a common XML format so that messages can be understood at  
either end?  
A - Service Transport  
B - XML Messaging  
C - Service Description  
D - Service Discovery  
Q 26 - Which of the following layer in Web Service Protocol Stack is responsible for  
describing the public interface to a specific web service?  
A - Service Transport  
B - XML Messaging  
C - Service Description  
D - Service Discovery  
Q 27 - Which of the following layer in Web Service Protocol Stack is responsible for  
centralizing services into a common registry and providing easy publish/find  
functionality?  
A - Service Transport  
B - XML Messaging  
C - Service Description  
D - Service Discovery  
Q 28 - Which of the following is correct about Service Transport layer in Web Service  
Protocol Stack?  
A - This layer is responsible for transporting messages between applications.  
B - Currently, this layer includes Hyper Text Transport Protocol HTTP, Simple Mail Transfer  
Protocol SMTP, File Transfer Protocol FTP, and newer protocols such as Blocks Extensible  
Exchange Protocol BEEP.  
C - Both of the above.  
D - None of the above.  
Q 29 - Which of the following is correct about XML Messaging layer in Web Service  
Protocol Stack?  
A - This layer is responsible for encoding messages in a common XML format so that messages  
can be understood at either end.  
B - Currently, this layer includes XML-RPC and SOAP.  
C - Both of the above.  
D - None of the above.  
Q 30 - Which of the following is correct about Service Description layer in Web Service  
Protocol Stack?  
A - This layer is responsible for describing the public interface to a specific web service.  
B - Currently, service description is handled via the Web Service Description Language WSDL.  
C - Both of the above.  
D - None of the above.  
Q 31 - Which of the following is correct about Service Discovery layer in Web Service  
Protocol Stack?  
A - This layer is responsible for centralizing services into a common registry and providing easy  
publish/find functionality.  
B - Currently, service discovery is handled via Universal Description, Discovery, and Integration  
UDDI.  
C - Both of the above.  
D - None of the above.  
Q 32 - What HTTP stands for?  
A - Hyperlink Text Transfer Protocol  
B - Hyper Text Transfer Protocol  
C - Hyper Transfer Text Protocol  
D - Hyper Time Transfer Protocol  
Q 33 - Which of the following is correct about HTTP protocol?  
A - Currently, HTTP is the most popular option for service transport.  
B - HTTP is simple, stable, and widely deployed. Furthermore, most firewalls allow HTTP traffic.  
C - This allows XML-RPC or SOAP messages to masquerade as HTTP messages.  
D - All of the above.  
Q 34 - What BEEP stands for?  
A - Blocks Exchange Extensible Protocol  
B - Blocks Extensible Exchange Protocol  
C - Blocks Extensible External Protocol  
D - Big Extensible Exchange Protocol  
Q 35 - Which of the following is correct about BEEP protocol?  
A - This is a promising alternative to HTTP.  
B - BEEP is a new Internet Engineering Task Force IETF framework for building new protocols.  
C - Both of the above.  
D - None of the above.  
Q 36 - Which of the following is correct about BEEP protocol?  
A - BEEP is layered directly on TCP and includes a number of built-in features, including an initial  
handshake protocol, authentication, security, and error handling.  
B - Using BEEP, one can create new protocols for a variety of applications, including instant  
messaging, file transfer, content syndication, and network management.  
C - Both of the above.  
D - None of the above.  
Q 37 - Which of the following is correct about XML RPC?  
A - XML-RPC is a simple protocol that uses XML messages to perform RPCs.  
B - XML-RPC is platform-independent.  
C - Both of the above.  
D - None of the above.  
Q 38 - How request is sent in XML-RPC?  
A - Requests are encoded in XML and sent via HTTP POST.  
B - Requests are encoded in XML and sent via HTTP GET.  
C - Both of the above.  
D - None of the above.  
Q 39 - How response is sent in XML-RPC?  
A - XML responses are appended to the url of the HTTP response.  
B - XML responses are embedded in the body of the HTTP response.  
C - Both of the above.  
D - None of the above.  
Q 40 - Which of the following is correct about XML RPC?  
A - XML-RPC is a simple protocol that uses XML messages to perform RPCs.  
B - XML-RPC is platform-independent.  
C - XML-RPC allows diverse applications to communicate.  
D - All of the above.  
Q 41 - Which of the following is correct about XML RPC?  
A - A Java client can speak XML-RPC to a Perl server.  
B - XML-RPC is the easiest way to get started with web services.  
C - Both of the above.  
D - None of the above.  
Q 42 - What SOAP stands for?  
A - State Access Object Protocol  
B - State Allied Object Protocol  
C - Simple Access Object Protocol  
D - Simple Allied Object Protocol  
Q 43 - Which of the following is correct about SOAP?  
A - SOAP is an XML-based protocol for exchanging information between computers.  
B - SOAP is a communication protocol.  
C - SOAP is for communication between applications.  
D - All of the above.  
Q 44 - Which of the following is correct about SOAP?  
A - SOAP is a format for sending messages.  
B - SOAP is designed to communicate via Internet.  
C - SOAP is platform independent.  
D - All of the above.  
Q 45 - Which of the following is correct about SOAP?  
A - SOAP is language independent.  
B - SOAP is simple and extensible.  
C - Both of the above.  
D - None of the above.  
Q 46 - Which of the following is correct about SOAP?  
A - SOAP allows you to get around firewalls.  
B - SOAP will be developed as a W3C standard.  
C - Both of the above.  
D - None of the above.  
Q 47 - Is SOAP platform independent?  
A - true  
B - false  
Q 48 - What WSDL stands for?  
A - Web Services Description Language  
B - Web Services Direction Language  
C - Wired Services Description Language  
D - Web Services Dialect Language  
Q 49 - Which of the following is correct about WSDL?  
A - WSDL is an XML-based language for describing web services and how to access them.  
B - WSDL was developed jointly by Microsoft and IBM.  
C - WSDL is an XML based protocol for information exchange in decentralized and distributed  
environments.  
D - All of the above.  
Q 50 - Which of the following is correct about WSDL?  
A - WSDL is the standard format for describing a web service.  
B - WSDL definition describes how to access a web service and what operations it will perform.  
C - WSDL is a language for describing how to interface with XML-based services.  
D - All of the above.  
ANSWER SHEET  
Question Number Answer Key  
1
2
3
4
5
6
7
8
D
D
C
D
D
A
B
C
9
1
1
1
1
1
1
1
1
1
1
2
2
2
2
2
2
2
2
2
2
3
3
3
3
3
3
3
3
3
3
4
4
4
4
D
C
D
D
D
D
D
C
C
D
D
A
B
C
D
A
B
C
D
C
C
C
C
B
D
B
C
C
C
A
B
D
C
C
D
0
1
2
3
4
5
6
7
8
9
0
1
2
3
4
5
6
7
8
9
0
1
2
3
4
5
6
7
8
9
0
1
2
3
4
4
4
4
4
4
5
4
5
6
7
8
9
0
D
C
C
A
A
D
D
Loading [MathJax]/jax/output/HTML-CSS/jax.js  
Web Services MOCK Test  
1
) What is the purpose of XML in a web service?  
A).A web services takes the help of XML to tag the data, format the data.  
B).A web service takes the help of XML to transfer a message.  
C).A web service takes the help of XML to describe the availability of service.  
D).A web service takes the help of XML to describe the availability of service.  
Ans:- A  
2
) WSDL stands for?  
A).Web Services Direction Language.  
B).Web Services Description Language.  
C).Wired Services Description Language.  
D).Web Services Dialect Language  
Ans:- B  
3
) WCF services cancommunicate with _______.  
A).All programming languages  
B). XML  
C).Only the languages included with Visual Studio .NET  
D).Multiple platforms and multiple language  
Ans: D  
4
) Which of the following is correct about UDDI?  
A).UDDI is seen with SOAP and WSDL as one of the three foundation standards of  
web services.  
B).UDDI is not an open industry initiative enabling businesses to discover each other  
and define how they interact over the Internet.  
C). Web servise registry in UDDI is not Manditory.  
D). UDDI do not follow xml format.  
Ans: A  
5
)__________ layer is responsible for describing the public interface to a specific web  
service.  
A).Service Discovery  
B).Messaging  
C).Service Description  
D).Service Interface  
Ans: C  
6
) BEEP stands for______  
A).Blocks Extensible Enhancement Protocol  
B).Blocks Extend Exchange Protocol  
C).Blocks Exchange Extensible Protocol  
D).Blocks Extensible Exchange Protocol  
Ans : D  
7
)________ layer is responsible for actually transporting XMLmessages between two  
computers.  
A).Service Protocol  
B). Service Messaging  
C).Service Transport  
D).Service Description  
Answer: C  
8
) Which of thefollowing is correct about XML- RPC?  
A).Full form of XML-RPC is XML remotely present Call  
B).XML-RPC is platform-dependent.  
C).XML-RPC is not the easiest way to get started with web services.  
D).Requests are encoded in XML and sent via HTTP POST.  
Ans: D  
9
) _________ is a simple protocol that uses XML messages to perform RPCs.  
A).SOAP  
B).XML  
C).XML-RPC  
D).BEEP  
Ans: C  
1
0) RPC provides a _________ on the client side, a separate one for each remote procedure.  
A).Stub  
B).Identifier  
C).Name  
D).Process identifier  
Ans:- A  
1
1) UDDIstands for __________.  
A).Universal Description, Discovery, and Integration.  
B).Uniform Description, Discovery, and Integration.  
C).Universal Description, Discovery, and Interference.  
D).Unique Description, Discovery, and Integration.  
Ans: A  
1
2) Three specific security issues with web services.  
A).Confidentiality, Integration, Network Security.  
B).Consistency, Authentication, Network Security.  
C).Confidentiality, Authentication, Network Security.  
D).Safety, Consistency, Integration  
Ans: C  
1
3) Three major roles within the web service architecture.  
A).Service Discovery, Service Requester, Service Registry.  
B).Service Provider, Service Requester, Service Registry.  
C).Service Provider, Service Messaging, Service Registry.  
D).Service Provider, Service Requester, Service Description  
Ans: B  
1
4)_________is an XML-based standard for describing, publishing,and finding web services.  
A). SOAP  
B).HTTP  
C).WSDL  
D).UDDI  
Ans: D  
1
5) Which layer of the TCP / IP stack corresponds to the OSI model transport layer?  
A).Host to host  
B).Application  
C).Internet  
D).Network Access  
Ans: A  
1
6)__________ layer of OSI model is responsible for moving the packets from source to  
destination.  
A).Transport  
B).Application  
C).Data link  
D).Network  
Ans: D  
1
7) TCP/IP model does not have ______ layer but OSI model have this layer.  
A).Session layer  
B).Transport layer  
C).Application layer  
D).Network layer  
Ans: A  
1
8) IGMP stands for________  
A).Internet Group Mail Protocol.  
B).Internet Group Message Protocol.  
C).Instant Group Message Protocol.  
D).Internet Global Message Protocol  
Answer: B  
1
9) What is the other name for object middleware?  
A).Object request interface  
B).Object enabled interface  
C).Object Request broker  
D).Object enabled broker  
Ans: C  
2
0) Which of the following are the major components of message in Messaging based  
interprocess communication.  
A).MessageHeader,Message Metadata, Message body  
B).MessageHeader,Message Subject, Message body  
C).MessageHeader,Message Metadata, Message block  
D).Message Heading, Message Data, Message part  
Answer: A  
What is the correct syntax  
of the declaration which defines the XML version?  
A).<xml version="A.0" />  
B).<?xml version="A.0"?>  
C).<?xml version="A.0" />  
D).<xml version="0" *>  
Answer:- B  
2
2) RMI stands for?  
A).Remote Mail Invocation  
B).Remote Message Invocation  
C).Remaining Method Invocation  
D).Remote Method Invocation  
Ans : D  
2
3) A software that lies between the OS and the applications running on it.  
A).Firmware  
B).Middleware  
C).Utility Software  
D).Utility Software  
Answer: B)  
RESTFUL MOCK TEST  
Copyright © tutorialspoint.com  
This section presents you various set of Mock Tests related to RESTful Framework. You can  
download these sample mock tests at your local machine and solve offline at your convenience.  
Every mock test is supplied with a mock test key to let you verify the final score and grade yourself.  
RESTFUL MOCK TEST III  
Q 1 - Which of the following is a best practice for designing a secure RESTful web  
service?  
A - Validation - Validate all inputs on the server. Protect your server against SQL or NoSQL  
injection attacks.  
B - Session based authentication - Use session based authentication to authenticate a user  
whenever a request is made to a Web Service method.  
C - Both of the above.  
D - None of the above.  
Q 2 - Which of the following is a best practice for designing a secure RESTful web  
service?  
A - No sensitive data in URL - Never use username, password or session token in URL , these  
values should be passed to Web Service via POST method.  
B - Restriction on Method execution - Allow restricted use of methods like GET, POST, DELETE.  
GET method should not be able to delete data.  
C - Both of the above.  
D - None of the above.  
Q 3 - Which of the following is a best practice for designing a secure RESTful web  
service?  
A - Validate Malformed XML/JSON - Check for well formed input passed to a web service method.  
B - Throw generic Error Messages - A web service method should use HTTP error messages like  
4
03 to show access forbidden etc.  
C - Both of the above.  
D - None of the above.  
Q 4 - Which of the following HTTP Status code means OK, shows success?  
A - 200  
B - 201  
C - 204  
D - 304  
Q 5 - Which of the following HTTP Status code means CREATED, when a resource is  
successful created using POST or PUT request?  
A - 200  
B - 201  
C - 204  
D - 304  
Q 6 - Which of the following HTTP Status code means NO CONTENT, when response  
body is empty for example, a DELETE request?  
A - 200  
B - 201  
C - 204  
D - 304  
Q 7 - Which of the following HTTP Status code means NOT MODIFIED, used to reduce  
network bandwidth usage in case of conditional GET requests?  
A - 200  
B - 201  
C - 204  
D - 304  
Q 8 - Which of the following HTTP Status code means BAD REQUEST, states that  
invalid input is provided e.g. validation error, missing data?  
A - 400  
B - 401  
C - 404  
D - 409  
Q 9 - Which of the following HTTP Status code means FORBIDDEN, states that user is  
not having access to method being used for example, delete access without admin  
rights?  
A - 400  
B - 401  
C - 404  
D - 409  
Q 10 - Which of the following HTTP Status code means NOT FOUND, states that  
method is not available?  
A - 400  
B - 401  
C - 404  
D - 409  
Q 11 - Which of the following HTTP Status code means CONFLICT, states conflict  
situation while executing the method for example, adding duplicate entry?  
A - 400  
B - 401  
C - 404  
D - 409  
Q 12 - Which of the following HTTP Status code means INTERNAL SERVER ERROR,  
states that server has thrown some exception while executing the method?  
A - 500  
B - 401  
C - 404  
D - 409  
Q 13 - What JAX-RS stands for?  
A - Just API for RESTful Web Services.  
B - Joint API for RESTful Web Services.  
C - JAVA API for RESTful Web Services.  
D - None of the above.  
Q 14 - Which of the following is correct about JAX-RS?  
A - JAX-RS is a JAVA based programming language API and specification to provide support for  
created RESTful Webservices.  
B - Its 2.0 version was released in 24 May 2013.  
C - Both of the above.  
D - None of the above.  
Q 15 - Which of the following is correct about JAX-RS?  
A - JAX-RS makes heavy use of annotations available from Java SE 5 to simplify development of  
JAVA based web services creation and deployment.  
B - It also provides supports for creating clients for RESTful web services.  
C - Both of the above.  
D - None of the above.  
Q 16 - Which of the following annotation of JAX RS API is used to annotate a method  
to get the relative path of the resource class/method?  
A - @Path  
B - @GET  
C - @PUT  
D - @POST  
Q 17 - Which of the following annotation of JAX RS API is used to annotate a method  
used to fetch resource?  
A - @Path  
B - @GET  
C - @PUT  
D - @POST  
Q 18 - Which of the following annotation of JAX RS API is used to annotate a method  
used to create resource?  
A - @Path  
B - @GET  
C - @PUT  
D - @POST  
Q 19 - Which of the following annotation of JAX RS API is used to annotate a method  
used to create/update resource?  
A - @Path  
B - @GET  
C - @PUT  
D - @POST  
Q 20 - Which of the following annotation of JAX RS API is used to annotate a method  
used to delete resource?  
A - @DELETE  
B - @HEAD  
C - @Produces  
D - @Consumes  
Q 21 - Which of the following annotation of JAX RS API is used to get status of method  
availability?  
A - @DELETE  
B - @HEAD  
C - @Produces  
D - @Consumes  
Q 22 - Which of the following annotation of JAX RS API states the HTTP Response  
generated by web service?  
A - @DELETE  
B - @HEAD  
C - @Produces  
D - @Consumes  
Q 23 - Which of the following annotation of JAX RS API states the HTTP Request type?  
A - @DELETE  
B - @HEAD  
C - @Produces  
D - @Consumes  
Q 24 - Which of the following annotation of JAX RS API binds the parameter passed to  
method to a value in path?  
A - @PathParam  
B - @QueryParam  
C - @MatrixParam  
D - @HeaderParam  
Q 25 - Which of the following annotation of JAX RS API binds the parameter passed to  
method to a query parameter in path?  
A - @PathParam  
B - @QueryParam  
C - @MatrixParam  
D - @HeaderParam  
Q 26 - Which of the following annotation of JAX RS API binds the parameter passed to  
method to a HTTP matrix parameter in path?  
A - @PathParam  
B - @QueryParam  
C - @MatrixParam  
D - @HeaderParam  
Q 27 - Which of the following annotation of JAX RS API binds the parameter passed to  
method to a HTTP header?  
A - @PathParam  
B - @QueryParam  
C - @MatrixParam  
D - @HeaderParam  
Q 28 - Which of the following annotation of JAX RS API binds the parameter passed to  
method to a Cookie?  
A - @CookieParam  
B - @FormParam  
C - @DefaultValue  
D - @Context  
Q 29 - Which of the following annotation of JAX RS API binds the parameter passed to  
method to a form value?  
A - @CookieParam  
B - @FormParam  
C - @DefaultValue  
D - @Context  
Q 30 - Which of the following annotation of JAX RS API assigns a default value to a  
parameter passed to method?  
A - @CookieParam  
B - @FormParam  
C - @DefaultValue  
D - @Context  
Q 31 - Which of the following annotation of JAX RS API is used to inject a context of  
the resource for example HTTPRequest as a context  
A - @CookieParam  
B - @FormParam  
C - @DefaultValue  
D - @Context  
Q 32 - REST is web standards based architecture and uses HTTP Protocol for data  
communication.  
A - false  
B - true  
Q 33 - In REST architecture, a REST Server simply provides access to resources and  
REST client accesses and presents the resources.  
A - false  
B - true  
Q 34 - A web service is a collection of open protocols and standards used for  
exchanging data between applications or systems.  
A - true  
B - false  
Q 35 - RESTful web services use HTTP methods to implement the concept of REST  
architecture.  
A - true  
B - false  
Q 36 - A RESTful web service usually defines a URI, Uniform Resource Identifier a  
service, provides resource representation such as JSON and set of HTTP Methods.  
A - false  
B - true  
Q 37 - RESTful web services make use of FTP protocol as a medium of communication  
between client and server.  
A - true  
B - false  
Q 38 - A RESTful web service client sends a message in form of a Gopher Request and  
server responds in form of a HTTP Response.  
A - true  
B - false  
Q 39 - URI of HTTP request indicates HTTP methods to be executed by RESTful Web  
services.  
A - false  
B - true  
Q 40 - Request Header - Contains metadata for the HTTP Request message as key-  
value pairs.  
A - false  
B - true  
Q 41 - Status/Response Code - Indicate Server status for the requested resource.  
A - false  
B - true  
Q 42 - Response Header - Contains metadata for the HTTP Response message as key-  
value pairs.  
A - true  
B - false  
Q 43 - Request Body - Contains Message content or Resource representation.  
A - true  
B - false  
Q 44 - Each resource in REST architecture is identified by its URI.  
A - true  
B - false  
Q 45 - Purpose of an URI is to do the DNS lookup.  
A - true  
B - false  
Q 46 - Web services can treat each method request independently.  
A - true  
B - false  
Q 47 - As HTTP is itself a statelessness protocol, RESTful Web services work  
seamlessly with HTTP protocol.  
A - true  
B - false  
Q 48 - PUT opearations should be readonly.  
A - true  
B - false  
Q 49 - POST opearations should be idempotent.  
A - true  
B - false  
Q 50 - GET opearations should be readonly.  
A - true  
B - false  
ANSWER SHEET  
Question Number Answer Key  
1
2
3
4
5
6
7
8
9
1
C
C
C
A
B
C
D
A
B
C
0
1
1
1
1
1
1
1
1
1
2
2
2
2
2
2
2
2
2
2
3
3
3
3
3
3
3
3
3
3
4
4
4
4
4
4
1
2
3
4
5
6
7
8
9
0
1
2
3
4
5
6
7
8
9
0
1
2
3
4
5
6
7
8
9
0
1
2
3
4
5
D
A
C
C
C
A
B
C
D
A
B
C
D
A
B
C
D
A
B
C
D
B
B
A
A
B
B
B
A
B
B
A
A
A
B
4
4
4
4
5
6
7
8
9
0
A
A
B
B
A
Loading [MathJax]/jax/output/HTML-CSS/jax.js  
RESTFUL MOCK TEST  
Copyright © tutorialspoint.com  
This section presents you various set of Mock Tests related to RESTful Framework. You can  
download these sample mock tests at your local machine and solve offline at your convenience.  
Every mock test is supplied with a mock test key to let you verify the final score and grade yourself.  
RESTFUL MOCK TEST I  
Q 1 - What REST stands for?  
A - Represent State Transfer  
B - REpresentational State Transfer  
C - Represent State Transfer  
D - None of the above.  
Q 2 - Which of the following is true about REST?  
A - REST is web standards based architecture and uses HTTP Protocol for data communication.  
B - It revolves around resource where every component is a resource and a resource is accessed  
by a common interface using HTTP standard methods.  
C - REST was first introduced by Roy Fielding in 2000.  
D - All of the above.  
Q 3 - Which of the following is true about REST?  
A - In REST architecture, a REST Server simply provides access to resources and REST client  
accesses and presents the resources.  
B - Each resource is identified by URIs/ global IDs.  
C - REST uses various representations to represent a resource like text, JSON and XML.  
D - All of the above.  
Q 4 - Which of the following is not a valid HTTP methods used in RESTful web  
services?  
A - GET  
B - PUT  
C - TIME  
D - POST  
Q 5 - Which of the following is not a valid HTTP methods used in RESTful web  
services?  
A - OPTIONS  
B - DELETE  
C - DATE  
D - POST  
Q 6 - Which of the following is correct about web services?  
A - A web service is a collection of open protocols and standards used for exchanging data  
between applications or systems.  
B - Software applications written in various programming languages and running on various  
platforms can use web services to exchange data among them over computer networks like the  
Internet.  
C - Both of the above.  
D - None of the above.  
Q 7 - Which of the following is correct about RESTful web services?  
A - Web services based on REST Architecture are known as RESTful web services.  
B - These web services use HTTP methods to implement the concept of REST architecture.  
C - A RESTful web service usually defines a URI, Uniform Resource Identifier a service, provides  
resource representation such as JSON and set of HTTP Methods.  
D - All of the above.  
Q 8 - Which of the following is correct about resource representation in REST?  
A - REST uses various representations to represent a resource where text, JSON, XML.  
B - XML and JSON are the most popular representations of resources.  
C - Both of the above.  
D - None of the above.  
Q 9 - Which of the following depicts best practice, Understandability for resource  
representation in REST?  
A - Both Server and Client should be able to understand and utilize the representation format of  
the resource.  
B - Format should be able to represent a resource completely. For example, a resource can  
contain another resource. Format should be able to represent simple as well as complex  
structures of resources.  
C - A resource can have a linkage to another resource, a format should be able to handles such  
situations.  
D - None of the above.  
Q 10 - Which of the following depicts best practice, Completeness for resource  
representation in REST?  
A - Both Server and Client should be able to understand and utilize the representation format of  
the resource.  
B - Format should be able to represent a resource completely. For example, a resource can  
contain another resource. Format should be able to represent simple as well as complex  
structures of resources.  
C - A resource can have a linkage to another resource, a format should be able to handles such  
situations.  
D - None of the above.  
Q 11 - Which of the following depicts best practice, Linkablity for resource  
representation in REST?  
A - Both Server and Client should be able to understand and utilize the representation format of  
the resource.  
B - Format should be able to represent a resource completely. For example, a resource can  
contain another resource. Format should be able to represent simple as well as complex  
structures of resources.  
C - A resource can have a linkage to another resource, a format should be able to handles such  
situations.  
D - None of the above.  
Q 12 - Which of the following protocol is used by RESTful web services as a medium of  
communication between client and server?  
A - HTTP  
B - FTP  
C - Gopher  
D - None of the above.  
Q 13 - Which of the following is correct about messaging in RESTful web services?  
A - A client sends a message in form of a HTTP Request and server responds in form of a HTTP  
Response.  
B - These messages contain message data and metadata i.e. information about message itself.  
C - Both of the above.  
D - None of the above.  
Q 14 - Which of the following component of HTTP request indicates HTTP methods  
such as GET, POST, DELETE, PUT etc.?  
A - VERB  
B - URI  
C - HTTP Version  
D - Request Header  
Q 15 - Which of the following component of HTTP request is used to identify the  
resource on server?  
A - VERB  
B - URI  
C - HTTP Version  
D - Request Header  
Q 16 - Which of the following component of HTTP request is used to indicate HTTP  
version?  
A - VERB  
B - URI  
C - HTTP Version  
D - Request Header  
Q 17 - Which of the following component of HTTP request contains metadata for the  
HTTP Request message as key-value pairs?  
A - VERB  
B - URI  
C - HTTP Version  
D - Request Header  
Q 18 - Which of the following component of HTTP request contains message content  
or Resource representation?  
A - Request Body  
B - URI  
C - HTTP Version  
D - Request Header  
Q 19 - Which of the following component of HTTP response indicates server status for  
the requested resource?  
A - Status/Response Code  
B - HTTP Version  
C - Response Header  
D - Response Body  
Q 20 - Which of the following component of HTTP response indicates HTTP version?  
A - Status/Response Code  
B - HTTP Version  
C - Response Header  
D - Response Body  
Q 21 - Which of the following component of HTTP response contains metadata for the  
HTTP Response message as key-value pairs?  
A - Status/Response Code  
B - HTTP Version  
C - Response Header  
D - Response Body  
Q 22 - Which of the following component of HTTP response contains response  
message content or Resource representation?  
A - Status/Response Code  
B - HTTP Version  
C - Response Header  
D - Response Body  
Q 23 - Which of the following is correct about addressing in RESTful web services?  
A - Addressing refers to locating a resource or multiple resources lying on the server.  
B - It is analogous to locate a postal address of a person.  
C - Both of the above.  
D - None of the above.  
Q 24 - What URI stands for?  
A - Unit Resource Identifier  
B - Uniform Representation Identifier  
C - Uniform Resource Identifier  
D - None of the above.  
Q 25 - Which of the following is correct about URI in RESTful web services?  
A - Each resource in REST architecture is identified by its URI.  
B - Purpose of an URI is to locate a resources on the server hosting the web service.  
C - Both of the above.  
D - None of the above.  
Q 26 - Which of the following is a best practice to create a standard URI for a web  
service?  
A - Use Plural Noun.  
B - Avoid using spaces.  
C - Use lowercase letters  
D - All of the above.  
Q 27 - Which of the following is a best practice to create a standard URI for a web  
service?  
A - Maintain Backward Compatibility  
B - Use HTTP Verb  
C - Both of the above.  
D - None of the above.  
Q 28 - Which of the following is correct about statelessness in context of RESTful web  
service?  
A - As per REST architecture, a RESTful web service should not keep a client state on server.  
B - It is responsibility of the client to pass its context to server and then server can store this  
context to process client's further request.  
C - Both of the above.  
D - None of the above.  
Q 29 - Which of the following is advantage of RESTful web service being stateless?  
A - Web services can treat each method request independently.  
B - Web services need not to maintain client's previous interactions. It simplifies application  
design.  
C - As HTTP is itself a statelessness protocol, RESTful Web services work seamlessly with HTTP  
protocol.  
D - All of the above.  
Q 30 - Which of the following HTTP method should be idempotent in nature?  
A - GET  
B - PUT  
C - POST  
D - HEAD  
Q 31 - Which of the following HTTP method should be idempotent in nature?  
A - OPTIONS  
B - DELETE  
C - POST  
D - HEAD  
Q 32 - Which of the following HTTP method should be read only in nature?  
A - GET  
B - DELETE  
C - POST  
D - PUT  
Q 33 - Which of the following HTTP method should be used to create/update resource  
using RESTful web service?  
A - GET  
B - DELETE  
C - POST  
D - OPTIONS  
Q 34 - Which of the following HTTP method should be used to delete resource using  
RESTful web service?  
A - GET  
B - DELETE  
C - POST  
D - OPTIONS  
Q 35 - Which of the following HTTP method should be used to create resource using  
RESTful web service?  
A - GET  
B - DELETE  
C - PUT  
D - OPTIONS  
Q 36 - Which of the following HTTP method should be used to fetch resource using  
RESTful web service?  
A - GET  
B - DELETE  
C - PUT  
D - OPTIONS  
Q 37 - Which of the following HTTP method should be used to get status of method  
availability in RESTful web service?  
A - GET  
B - HEAD  
C - PUT  
D - OPTIONS  
Q 38 - Which of the following HTTP method should be used to get list the supported  
operations in RESTful web service?  
A - GET  
B - HEAD  
C - PUT  
D - OPTIONS  
Q 39 - Which of the following is true about caching in RESTful web service?  
A - Caching refers to storing server response in client itself so that a client needs not to make  
server request for same resource again and again.  
B - A server response should have information about how a caching is to be done so that a client  
caches response for a period of time or never caches the server response.  
C - Both of the above.  
D - None of the above.  
Q 40 - Which of the following header of HTTP response, provides the date and time of  
the resource when it was created?  
A - Date  
B - Last Modified  
C - Cache-Control  
D - Expires  
Q 41 - Which of the following header of HTTP response, provides the date and time of  
the resource when it was last modified?  
A - Date  
B - Last Modified  
C - Cache-Control  
D - Expires  
Q 42 - Which of the following header of HTTP response provides control over caching?  
A - Date  
B - Last Modified  
C - Cache-Control  
D - Expires  
Q 43 - Which of the following header of HTTP response sets expiration date and time  
of caching?  
A - Date  
B - Last Modified  
C - Cache-Control  
D - Expires  
Q 44 - Which of the following directive of Cache Control Header of HTTP response  
indicates that resource is cachable by any component?  
A - Public  
B - Private  
C - no-cache/no-store  
D - max-age  
Q 45 - Public directive of Cache Control Header of HTTP response indicates that  
resource is cachable by any component.  
A - true  
B - false  
Q 46 - Which of the following directive of Cache Control Header of HTTP response  
indicates that resource is cachable by only client and server?  
A - Public  
B - Private  
C - no-cache/no-store  
D - max-age  
Q 47 - Which of the following directive of Cache Control Header of HTTP response  
indicates that resource is not cachable?  
A - Public  
B - Private  
C - no-cache/no-store  
D - max-age  
Q 48 - Which of the following directive of Cache Control Header of HTTP response can  
set the time limit of caching?  
A - Public  
B - Private  
C - no-cache/no-store  
D - max-age  
Q 49 - Which of the following directive of Cache Control Header of HTTP response  
provides indication to server to revalidate resource if max-age has passed?  
A - must-revalidate  
B - Private  
C - no-cache/no-store  
D - max-age  
Q 50 - Which of the following is a best practice for caching in RESTful web service?  
A - Always keep static contents like images, css, JavaScript cacheable, with expiration date of 2 to  
3
days.  
B - Never keep expiry date too high.  
C - Dynamic contents should be cached for few hours only.  
D - All of the above.  
ANSWER SHEET  
Question Number Answer Key  
1
2
B
D
3
4
5
6
7
8
9
1
1
1
1
1
1
1
1
1
1
2
2
2
2
2
2
2
2
2
2
3
3
3
3
3
3
3
3
D
C
C
C
D
C
A
B
C
A
C
A
B
C
D
A
A
B
C
D
C
C
C
D
C
C
D
B
B
A
C
B
C
A
B
0
1
2
3
4
5
6
7
8
9
0
1
2
3
4
5
6
7
8
9
0
1
2
3
4
5
6
7
3
3
4
4
4
4
4
4
4
4
4
4
5
8
9
0
1
2
3
4
5
6
7
8
9
0
D
C
A
B
C
D
A
A
B
C
D
A
D
Loading [MathJax]/jax/output/HTML-CSS/jax.js  
Question Bank – XML (Solved/Unsolved)  
Q.1Fill in the Blanks: (1 Mark each)  
1
2
3
4
5
6
7
8
. With XML, you can create your own elements , also called tags.  
. The beginning or first element in XML is called the root (document)  
. Jon Bosak is known as the father of XML.  
element.  
. HTML is an application of SGML _  
. The XML linking language is called XLink  
. The CSS property font-weight allows you to control text boldness.  
. A child element has a direct relationship to a parent element.  
.
.
. A [prefix with] colon in an element or attribute name must be associated with a namespace  
identifier.  
9
1
1
1
1
1
1
1
1
1
1
2
2
2
2
2
2
2
. An attribute modifies an element by associating information with it.  
0. Element names are case sensitive.  
1. External DTDs can reference both SYSTEM and PUBLIC  
2. A valid XML document has a DTD associated with it.  
identifiers.  
3. An XML document can have both an internal and external subset.  
4. <!ATTLIST ...> declares one or more attributes  
5. A content model defines what elements may be contained within another element.  
.
6. Element names must begin with a letter or an underscore  
7.An empty element contains no content.  
.
8. A  
?
repetition operator mean zero or one instance of the element.  
list or a choice list.  
9. Content models are defined with either a sequence  
0. In the functional notation rgb( ), you can use numbers or percentages  
1. Attribute names must begin with a letter or underscore.  
2. The keyword for an optional attribute is #IMPLIED  
.
3. The ID attribute type defines an attribute value as a unique identifier.  
4. The xml:lang attribute is a built-in XML attribute for specifying languages.  
5. A NOTATION declaration is needed for this type of enumerated attribute..  
6. An internal entity is declared locally in a DTD while an external  
separate document.  
entity is declared in a  
2
2
2
3
3
3
3
7. A parameter entity is legal only in a DTD.  
8. A general entity reference begins with an ampersand (&)  
9. Any parsed entity consists of legal XML text.  
0. One tool you can use to test a DTD is with a conditional  
1. A namespace definition without a prefix is known as a default  
2. Namespaces are declared with an xmlns declaration in an element start-tag.  
3. The namespace myth refers to a belief that namespaces are associated with, or validated by,  
schemas.  
and ends with a semicolon.  
section.  
namespace.  
3
4. You can declare multiple namespaces with multiple instances of the xmlns  
declaration within a start-tag.  
3
3
3
3
5. Namespaces are often declared within the start-tag of a root  
6. Unnamed definitions of simple or complex types are known as anonymous  
7. With <complexType>, you can define content of both complex and mixed type.  
8. minOccurs specifies the minimum times an element may occur while maxOccurs  
determines the maximum times it may occur  
element.  
.
3
9. The ref attribute can reference other element and attribute definitions in a schema.  
Page 1 of 1  
ACTS National Resource Center, Pune  
Question Bank – XML (Solved/Unsolved)  
4
4
0. The <attribute> element must be declared with either a named or anonymous complexType  
1. The original XML document or byte stream is referred to as a source tree and the output is called  
the result tree.  
4
4
4
4
4
4
4
4
5
2. Location paths can be either abbreviated or unabbreviated  
3. A synonym for <xsl:stylesheet> is <xsl:transform>  
4. The instruction <xsl:element> is an example of an XSLT  
5. Both <xsl:if> and <xsl:choose> help perform conditional  
.
.
element.  
processing.  
6. The root element for XHTML is html  
.
7. The root element must contain a namespace declaration.  
8. In XHTML, always use a CDATA section inside the <script> element.  
9. The forthcoming recommendation for small devices is called XHTML Basic  
.
0. Document profiles defines the elements, etc. that are appropriate for a certain class of  
document, without a formal recommendation.  
Q.2Select True or False: (1 Mark each)  
1
2
3
4
5
6
7
8
9
1
1
1
1
1
1
1
1
1
1
2
2
2
2
2
2
2
2
2
2
3
3
. XML will replace HTML as the leading language for the Web. (False)  
. To use XML you must pay a small license fee to Sun Microsystems. (False)  
. A URL is a subset of the URI naming scheme. (True)  
. Namespaces in XML cause regrettable naming collisions. (False)  
. Every XML document should have a prolog or XML declaration. (False)  
. XML forms comments differently than SGML and HTML. (False)  
. HTML elements must always properly nest. (False)  
. Valid XML must also be well formed. (True)  
. It is permissible, but not mandatory, to quote XML attribute values. (False)  
0. An internal subset requires a SYSTEM identifier. (False)  
1. An external subset requires a URI. (True)  
2. A validity error is always fatal. (False)  
3. XML does not necessarily have to be well-formed, but it must be valid. (False)  
4. An element name can begin with any character that is legal in an element. (False)  
5. Child element and mixed content models must be enclosed in quotes. (False)  
6. A semicolon delimits element names in a sequence list. (False)  
7. A hexadecimal value representing an RGB triplet can be expressed in three or six digits. (True)  
8. You can skip quotation marks around an attribute value. (False)  
9. If you reuse a unique ID, it should generate a validity error. (True)  
0. An unparsed entity is a non-XML data type. (True)  
1. Certain attributes are permissible in end-tags. (False)  
2. CSS/2’s attribute selector is fully implemented in the Netscape and Microsoft browsers. (False)  
3. An unparsed entity may require a helper application to render it. (True)  
4. Predefined entities represent special markup characters. (True)  
5. Parameter entity references begin with an ampersand. (False)  
6. Unicode characters can be represented by hexadecimal numbers. (True)  
7. Conditional sections are legal in XML documents as well as DTDs. (False)  
8. Namespaces can be associated with schemas by a URI. (True)  
9. A URI can be either a URL or a URN. (True)  
0. Default namespaces apply to attributes. (False)  
1. XML namespaces are not associated with objects. (True)  
Page 2 of 2  
ACTS National Resource Center, Pune  
Question Bank – XML (Solved/Unsolved)  
3
3
3
3
3
3
3
3
4
4
4
4
4
4
4
2. <choice> is used for grouping elements. (True)  
3. <string> is a built-in simple datatype. (True)  
4. A valid value for maxOccurs is unbounded. (True)  
5. A DTD has richer datatypes than XML Schema. (False)  
6. XML Schema unfortunately did not inherit the attribute types from XML 1.0. (False)  
7. Location paths come from the XPath standard. (True)  
8. You cannot embed an XSL stylesheet as you can CSS in HTML. (False)  
9. XSLFO does not completely replace CSS. (True)  
0. The <xsl:output> instruction is required in every XSL stylesheet. (False)  
1. XSLT is a W3C recommendation while XSLFO is not (yet). (True)  
2. Attribute values must be surrounded by double quotes. (False)  
3. XHTML is moving towards modularization. (True)  
4. It is good practice to nest <a> elements within <a> elements. (False)  
5. Do not include the XHTML namespace when including XHTML in an XML document. (False)  
6. The content or MIME type for XHTML is text/xhtml. (False)  
Q.3 Select the correct answer: (1 Mark each)  
1
.
.
What does XML stand for?  
1
2
3
4
.
.
.
.
eXtra Modern Link  
eXtensible Markup Language  
Example Markup Language  
X-Markup Language  
Level: Easy  
2
What is the correct syntax of the declaration which defines the XML version?:  
1.  
2.  
3.  
4.  
<xml version="1.0" />  
<?xml version="1.0"?>  
<?xml version="1.0" />  
None of the above  
Level: Easy  
3.  
Which statement is true?  
1.  
2.  
3.  
4.  
All the statements are true  
All XML elements must have a closing tag  
All XML elements must be lower case  
All XML documents must have a DTD  
Level: Easy  
4
.
.
Is it easier to process XML than HTML?  
1
2
3
4
.
.
.
.
Yes  
No  
Somtimes  
Cant say  
Level: Easy  
5
Which of the following programs support XML or XML applications?:  
Page 3 of 3  
ACTS National Resource Center, Pune  
Question Bank – XML (Solved/Unsolved)  
1.  
2.  
3.  
4.  
Internet Explorer 5.5  
Netscape 4.7  
RealPlayer.  
both 1 and 2  
Level: Easy  
6
.
.
Kind of Parsers are  
1.  
2.  
3.  
4.  
well-formed  
well-documented  
non-validating and validating  
none of the above  
Level: Easy  
7
Well formed XML document means  
1.  
2.  
3.  
4.  
it contains a root element  
it contain an element  
it contains one or more elements  
must contain one or more elements and root element must contain all  
other elements  
Level: Easy  
8
.
.
Comment in XML document is given by  
1.  
2.  
3.  
4.  
<?--  
<!--  
<!--  
</--  
-->  
--!>  
-->  
-- >  
Level: Easy  
9
When processing an output XML, "new line" symbols  
1.  
are copied into output "as is", i.e. "CR+LF" for Windows, CR for Macintosh, LF  
for Unix.  
2.  
3.  
4.  
are converted to single LF symbol  
are converted to single CR symbol  
are discarded  
Level: Easy  
1
0.  
Which of the following strings are a correct XML name?  
1.  
2.  
3.  
4.  
_myElement  
my Element  
#myElement  
None of the above  
Level: Easy  
11. Which of the following strings are a correct XML name?  
1.  
xmlExtension  
2. xslNewElement  
Page 4 of 4  
ACTS National Resource Center, Pune  
Question Bank – XML (Solved/Unsolved)  
3
4
.
.
XMLElement#123  
All  
Level: Easy  
12. Which of the following XML fragments are well-formed?  
1. <?xml?>  
2. <?xml version="1.0"?>  
3
4
.
.
<?xml encoding="JIS"?>  
<?xml encoding="JIS" version="1.0"?>  
Level: Easy  
13. What are the predefined attributes  
1
2
3
4
.
.
xml:lang  
xml:space  
. both  
. none.  
Level: Easy  
1
4. Kind of Parsers are  
1
2
3
4
.
.
.
well-formed  
validating  
non-validating  
. Both 2 & 3  
Level: Easy  
1
1
5. Valid XML document means (most appropriate)  
(
(
(
(
1) the document has root element  
2) the document contains atleast one or more root element  
3) the XML document has DTD associated with it & it complies with that DTD  
4) Each element must nest inside any enclosing element property  
6. XML uses the features of  
(
(
(
(
1) HTML  
2) XHTML  
3) VML  
4) SGML  
Level: Easy  
1
7. XML document can be viewed in  
(1) IE 3.0  
(2) IE 2.0  
(3) IE 6.0  
(4) IE X.0  
Level: Medium  
Page 5 of 5  
ACTS National Resource Center, Pune  
Question Bank – XML (Solved/Unsolved)  
Topic: DTD  
1
8. There is a way of describing XML data, how?  
1.  
2.  
3.  
4.  
XML uses a DTD to describe the data  
XML uses XSL to describe data  
XML uses a description node to describe data  
Both 1and 3  
Level: Medium  
1
2
9. What does DTD stand for?  
1.  
2.  
3.  
4.  
Direct Type Definition  
Document Type Definition  
Do The Dance  
Dynamic Type Definition  
Level: Medium  
0. DTD includes the specifications about the markup that can be used within the document, the  
specifications consists of all EXCEPT  
1
2
3
4
.
.
.
.
the browser name  
the size of element name  
entity declarations  
element declarations  
Level: Medium  
21. Which of the following XML documents are well-formed?  
1.  
<firstElement>some text goes here  
<
<
secondElement>another text goes here</secondElement>  
/firstElement>  
2
.
.
<firstElement>some text goes here</firstElement>  
secondElement> another text goes here</secondElement>  
<firstElement>some text goes here  
<
3
<
<
secondElement> another text goes here</firstElement>  
/secondElement>  
4.  
</firstElement>some text goes here  
<
<
/secondElement>another text goes here<secondElement>  
firstElement>  
Level: Medium  
22. Which of the following XML fragments are well-formed?  
1.  
2.  
3.  
4.  
<myElement myAttribute="someValue"/>  
<myElement myAttribute=someValue/>  
<myElement myAttribute=’someValue’>  
<myElement myAttribute="someValue’/>  
Level: Medium  
23. How can we make attributes have multiple values:  
1
2
.
.
<myElement myAttribute="value1 value2"/>  
<myElement myAttribute="value1" myAttribute="value2"/>  
Page 6 of 6  
ACTS National Resource Center, Pune  
Question Bank – XML (Solved/Unsolved)  
3
4
.
.
<myElement myAttribute="value1, value2"/>  
attributes cannot have multiple values  
Level: Medium  
24. Which of the following XML fragments are well-formed?  
1
2
3
4
.
.
<myElement myAttribute="value1 <= value2"/>  
<myElement myAttribute="value1 & value2"/>  
. <myElement myAttribute="value1 > value2"/>  
. None of the above  
Level: Medium  
25. The use of a DTD in XML development is:  
1.  
2.  
3.  
4.  
required when validating XML documents  
no longer necessary after the XML editor has been customized  
used to direct conversion using an XSLT processor  
a good guide to populating a templates to be filled in when generating an XML  
document automatically  
Level: Medium  
2
2
2
6. Parameter entities can appear in  
1
2
3
4
.
xml file  
. dtd file  
.
.
xsl file  
Both 1 and 2  
Level: Medium  
7. Attribute standalone="no" should be included in XML declaration if a document:  
1
2
3
4
.
.
.
is linked to an external XSL stylesheet  
has external general references  
has processing instructions  
. has an external DTD  
Level: Medium  
8. In XML  
(
(
(
(
1) the internal DTD subset is read before the external DTD  
2) the external DTD subset is read before the internal DTD  
3) there is no external type of DTD  
4) there is no internal type of DTD  
Level Easy  
2
9. Disadvantages of DTD are  
(
(
(
i)DTDs are not extensible  
ii)DTDs are not in to support for namespaces  
iii)there is no provision for inheritance from one DTDs to another  
(
(
(
1) (i) is correct  
2) (i),(ii) are correct  
3) (ii),(iii) are correct  
Page 7 of 7  
ACTS National Resource Center, Pune  
Question Bank – XML (Solved/Unsolved)  
(
4) (i),(ii),(iii) are correct  
Level:Medium  
3
0. To use the external DTD we have the syntax  
(
(
(
1) <?xml version=”1.0” standalone=”no”?>  
! DOCTYPE DOCUMENT SYSTEM “order.dtd”?>  
2) <?xml version=”1.0” standalone=”yes”?>  
! DOCTYPE DOCUMENT SYSTEM “order.dtd”?>  
3 )<?xml version=”1.0” standalone=”no”?>  
! DOCTYPE DOCUMENT “order.dtd”?>  
4) <?xml version=”1.0” standalone=”yes”?>  
! DOCTYPE DOCUMENT SYSTEM “order.dtd”?>  
<
<
<
(
<
Level: Medium  
3
3
1. To add the attribute named Type to the <customer> tag the syntax will be  
(1) <customer attribute Type=”exelent”>  
(2) <customer Type attribute =”exelent”>  
(3) <customer Type attribute_type=”exelent”>  
(4) <customer Type=”exelent”>  
Level: Medium  
2. The syntax for parameter entity is  
(1) <! ENTITY % NAME DEFINITION>  
(2) < ENTITY % NAME DEFINITION>  
(3) <! ENTITY $ NAME DEFINITION>  
(4) < ENTITY % NAME DEFINITION>  
Level: Medium  
Topic:Schema  
3
3
3
3. You can name the schema using the name attribute like  
1
2
3
4
.
.
.
<schema attribute=”schema1”>  
<schema nameattribute=”schema1”>  
<schema nameattri=”schema1”>  
. <schema name=”schema1”>  
Level: Medium  
4. The default model for complex type, in XML schemas for element is  
1.  
2.  
3.  
4.  
textOnly  
elementOnly  
no default type  
both 1 & 2  
Level: Medium  
5. Microsoft XML Schema Data types for Hexadecimal digits representating octates  
1.  
2.  
3.  
UID  
UXID  
UUID  
Page 8 of 8  
ACTS National Resource Center, Pune  
Question Bank – XML (Solved/Unsolved)  
4.  
XXID  
Level: Medium  
3
6. A schema describes  
(
(
(
(
i) grammer  
ii) vocabulary  
iii) structure  
iv) datatype of XML document  
(
(
(
(
1) (i) & (ii) are correct  
2) (i),(iii) ,(iv) are correct  
3) (i),(ii),(iv) are correct  
4) (i),(ii),(iii),(iv) are correct  
Level: Medium  
3
3
3
4
7. Microsoft XML Schema Data Type “boolean” has values  
(
(
(
(
1) True ,False  
2) True ,False or 1,0  
3) 1,0  
4) any number other then zero and zero  
Level: Difficult  
8. Simple type Built into Schema “data’ represent a data in  
(1) MM-DD-YY  
(2) Dd-MM-YY  
(3) YY-MM-DD  
(4) YYYY-MM-DD  
Level: Medium  
9. In simple Type Built into XML schema Boolean type holds  
(
(
(
(
1) True, False  
2) 1,0  
3) both (1) & (2)  
4) True/False and any number except 0  
Level: Medium  
0. In simple type built into XML schema type flat has single precision of  
floating point  
(1) 16 bit  
(2) 32 bit  
(3) 8 bit  
(4) 4 bit  
Level: Medium  
Topic: Misc.  
4
1.  
The XML DOM object is  
Page 9 of 9  
ACTS National Resource Center, Pune  
Question Bank – XML (Solved/Unsolved)  
1.  
2.  
3.  
4.  
Entity  
Entity Reference  
Comment Reference  
Comment Data  
Level: Medium  
4
2.Attribute of the document interface in DOM is/are  
(
(
(
i)doctype  
ii)implementation  
iii)documentElement  
which are read only attributes  
(
(
(
(
1) (i) only  
2) (ii) only  
3) (ii),(iii) only  
4) all  
Level: Medium  
4
4
4
4
4
3. The default model for complex type, in XML schemas for element is  
(
(
(
(
1) textOnly  
2) elementOnly  
3) no default type  
4) both a & b  
Level: Easy  
4. To create a choise in XML schemas, we use the  
(1) <xsd:select> element  
(2) <xsd:multi> element  
(3) <xsd:choise> element  
(4) <xsd:single> element  
Level: Medium  
5. The XML DOM object is  
(
(
(
(
1) Entity  
2) Entity Reference  
3) Comment Reference  
4) Comment Data  
Level: Medium  
6. To create a data island we use the  
HTML element  
(
(
(
(
1) <XML>  
2) <dataisland>  
3) <Island>  
4) <XMLIsland>  
Level: Medium  
7. To Bind the HTML elements with DSO we use  
attribute  
(1) DATASOURCE  
Page 10 of 10  
ACTS National Resource Center, Pune  
Question Bank – XML (Solved/Unsolved)  
(2) DATAFIELD  
(3) DATASRC  
(4) DATAFLD  
Level: Medium  
4
8. To bind the HTML element <INPUT> Type in text with the datasource “dsoCustomer” we  
use  
(1) <INPUT TYPE=”TEXT” DATAFIELD=”#dsoCustomer”>  
(2) <INPUT TYPE=”TEXT” DATASRC=”dsoCustomer”>  
(3) <INPUT TYPE=”TEXT” DATASRC=”#dsoCustomer”>  
(4) <INPUT TYPE=”TEXT” DATAFLD=”#dsoCustomer”>  
Level: Medium  
4
5
5
5
9. XML DSOs has the property for the number of pages of data the recordset contains  
(
(
(
(
1) count  
2) number  
3) pageCount  
4) pageNumber  
Level: Medium  
0. Whats so great about XML?  
(1) Easy data exchange  
(2) High speed on network  
(3) Only (2)is correct  
(4) Both (1) & (2)  
Level: Medium  
1. For XML document to be valid  
(
(
(
(
1) document need to be well formed also  
2) document need not to be well formed  
3) document need to be well formed & valid  
4) document validity has no relationship with well formedness  
Level: Medium  
2. A textual object is a well formed XML document if  
(i) Taken as a whole it matches the production labeled document.  
(ii) Each of the parsed entity which is referenced directly or indirectly within the  
document can be well formed  
(1) (i) is correct  
(2) (ii)is correct  
(3) both are correct  
Level: Medium  
5
3. <?xml version=”1.0” standalone=”yes” encoding=”UTF-8”?>  
(
(
1) it shows that the version is 1.0  
2) shows thatit is standalone  
Page 11 of 11  
ACTS National Resource Center, Pune  
Question Bank – XML (Solved/Unsolved)  
(3) the standalone is wrong  
(4) version attribute is not in XML  
Level: Medium  
5
4. The attribute used to define a new namespace is  
(
(
(
(
1) XMLNS  
2) XmlNameSpace  
3) Xmlns  
4) XmlNs  
Level: Medium  
Topic: Templates  
5
5. To match the root node in XMLT transform the syntax will be  
1.  
2.  
3.  
4.  
<xsl:template match=”Document”>  
<xsl:template match=”Root”>  
<xsl:template match=”RootNode”>  
<xsl:template match=”/”>  
Level: Medium  
5
6. To match the specific XML elements child like <NAME> of parent element is <PLANET> the syntax will  
be  
1.  
2.  
3.  
4.  
<xsl:template match=”PLANET_NAME”>  
<xsl:template match=”PLANET/NAME”>  
<xsl:template match=”/NAME”>  
<xsl:template match=”//”>  
Level: Medium  
57. PI in XML specification stands for  
1
2
3
4
. 3.14  
. priceless instruction  
. processing instruction  
. polymorphic inheritance  
Level: Medium  
58. A validating XML application should be used when:  
1
2
3
4
.
the design demands that all elements use both start and end tags  
. missing or out-of-place elements could cause application errors  
.
.
attribute values cannot refer to external entity references  
High performance is an important architectural constraint  
Level: Medium  
5
9. A DSO operates like  
(a) data simulation object at server side  
(b) dynamic source object at client side  
(c) data source object at client side  
(d) data simulation object at client side  
Page 12 of 12  
ACTS National Resource Center, Pune  
Question Bank – XML (Solved/Unsolved)  
Ans: ( c)  
Topic: XSL  
6
0.  
The XSL formating object use to format a list is  
1
2
3
4
.
.
.
.
list-block  
list-item  
list-item-body  
list-item-label  
Level: Difficult  
6
1. The attribute used to define a new namespace is  
1.  
2.  
3.  
4.  
XMLNS  
XmlNameSpace  
Xmlns  
XmlNs  
Level: Difficult  
62. Identify the most accurate statement about the application of XML:  
1
2
3
4
.
.
XML must be used to produce XML and HTML output.  
XML cannot specify or contain presentation information.  
. XML is used to describe hierarchically organized information.  
. XML performs the conversion of information between different e-business  
applications.  
Level: Difficult  
6
6
3. The XSl formatting object which formats the data and caption of a table is  
(
(
(
(
1) table  
2) table-content  
3) table-text  
4) none of the above  
Level: Difficult  
4. The XSL formating object which holds the content of the table body  
(
(
(
(
1) table  
2) table-body  
3) table-content  
4) table-footer  
Level: Difficult  
6
5. The XSL formatting object which formats the data in a table  
(
(
(
(
1) table  
2) table-body  
3) title  
4) table-content  
Level: Difficult  
Page 13 of 13  
ACTS National Resource Center, Pune  
Question Bank – XML (Solved/Unsolved)  
6
6
6
6. The XSL formating object use to hold the content of the label of a list item is  
(
(
(
(
1) list-block  
2) list item  
3) list-item-body  
4) list-item-label  
Level: Difficult  
7. The XSL formating object use to hold the contents of the body of a list item is  
(
(
(
(
1) list-block  
2) list item  
3) list-item-body  
4) list-item-label  
Level: Difficult  
8. XSL has formatting object “block”  
(
(
(
(
1) is not supported in XSL  
2) generates a block level reference area  
3) create a display block  
4) groups global declarations for a style sheet  
Level: Difficult  
6
9. XSL has “block container” for formating the document  
(1) to create a display block to format the titles  
(2) to create a display block to format the paragraphes  
(3) to create a display block to format the headlines & figures  
(4) to create a block level reference area  
Level: Difficult  
7
7
0. The syntax for writing the minimum occurrence for an element is  
(
(
(
(
1) <xsd:element ref=”note” min=”0”/>  
2) <xsd:elements ref=”note” min=”0”/>  
3) <xsd:elements ref=”note” minOccur=”0”/>  
4) <xsd:elements ref=”note” minOccurs=”0”/>  
Level: Medium  
1. The syntax for writing default values for element is  
(1) <xsd:element name=”max” type=”xsd:integer” value=”100”/>  
(2) <xsd:element name=”max” type=”xsd:integer” fixValue=”100”/>  
(3) <xsd:element name=”max” type=”xsd:integer” default=”100”/>  
(4) <xsd:element name=”max” type=”xsd:integer” defaultval=”100”/>  
Topic: XSLT , X-Pointers, XML  
2. To use XSLT in an XML system:  
7
1. the input and output of the XSLT processor must be unparsed XML documents  
Page 14 of 14  
ACTS National Resource Center, Pune  
Question Bank – XML (Solved/Unsolved)  
2. the input and output of the XSLT processor must be a hierarchical tree  
representing an XML document  
3
4
.
.
the XSLT processor must be called from a web agent  
the XSLT processor must be given the DTD as well as the XML document  
instance  
Level: Difficult  
73. What is the role of the XPath language in XSL processing?  
1.  
XPath identifies the order or path of processing to be followed as the XSL  
language is processed  
2
. XPath identifies locations in XML data to be transformed in the source tree  
and the locations to be generated in output tree specified in XSL  
translation prescriptions  
3.  
XPath identifies the path to be followed in the execution of XSL translation  
prescriptions  
4.  
XPath specifies which XSL transform files are to be used in the translation of  
XML  
Level: Difficult  
74. Which statement correctly describes the capabilities of the XSLT language?  
1
2
.
.
XSLT uses the DTD to determine how XML documents will be translated  
XSLT specifies how a hierarchical trees, representable by an XML document  
may be translated into non-hierarchical formats  
3
. XSLT specifies how a hierarchical tree, representable by an XML  
document, may be translated into another hierarchical tree, also  
representable by an XML document  
4. XSLT specifies the formatting style to be used to render an XML document  
Level: Difficult  
75. XSLT processors accept as input:  
1.  
2.  
3.  
4.  
an XML conforming document file and an XSLT specification file  
only an XML document  
only an XSLT specification  
either an XML document or an XSLT specification  
Level: Difficult  
7
6. The transformation of XML document in to another type of document by XSLT can be done  
by  
(
(
(
i)In the server  
ii)In the client  
iii)With a separate program  
(1) only(i) & (ii)  
(2) only (ii) & (iii)  
(3) all are correct  
Page 15 of 15  
ACTS National Resource Center, Pune  
Question Bank – XML (Solved/Unsolved)  
(4) only (i) & (iii)  
Level: Difficult  
77: To match the root node in XMLT transform the syntax will be  
(1) <xsl:template match=”Document”>  
(2) <xsl:template match=”Root”>  
(3) <xsl:template match=”RootNode”>  
(4) <xsl:template match=”/”>  
Level: Difficult  
78: To match the specific XML elements in XMLT the syntax for given name “rootnode” is  
(
(
(
(
1) <xsl:template match=”root”>  
2) <xsl:template match=”/”>  
3) <xsl:template match=”rootnode”>  
4) <xsl:template match=”//”>  
Level: Difficult  
79  
To match the specific XML elements child like <NAME> of parent element is <PLANET>  
the syntax will be  
(
(
(
(
1) <xsl:template match=”PLANET_NAME”>  
2) <xsl:template match=”PLANET/NAME”>  
3) <xsl:template match=”/NAME”>  
4) <xsl:template match=”//”>  
Level: Difficult  
8
0. InXSLT style sheet we have syntax to match elements with id as (if id is “change”)  
(1) <xsl:template match=”id(‘change’)”>  
(2) <xsl:template match=”(change)”>  
(3) <xsl:template match=”change”>  
(4) <xsl:template match-id=”Change”>  
Level: Difficult  
8
1. To match the text node (in XSLT) the syntax will be  
(1) <xsl:template match=”text”>  
(2) <xsl:template match-text=”text”>  
(3) <xsl:template match=text( )>  
(4) <xsl:template match=”text( )”>  
Level: Difficult  
8
2. An element declaration specifies  
1
. a single markup element  
2.  
3.  
4.  
zmarkup elements  
markup data  
the document data  
Page 16 of 16  
ACTS National Resource Center, Pune  
Question Bank – XML (Solved/Unsolved)  
Level: Easy  
8
3. Well formed XML document means(most appropriate)  
1
2
3
.
.
.
it contains a root element  
it contain an element  
it contains one or more elements  
must contain one or more elements and root element must contain all other elements  
Level: Easy  
4
.
8
1
2
3
4
4: Which of the following specify that the order and content of "membership" is not important  
. <!ELEMENT membership NORULE>  
. <!ELEMENT membership EMPTY>  
. <!ELEMENT membership ALL>  
. <!ELEMENT membership ANY>  
Level: Easy  
85: Which of the following is used to specify the attribute list of an element  
1
2
3
4
.
.
.
.
ATTLIST  
?ATTLIST  
!ATTLIST  
#ATTLIST  
Level: Medium  
86: Which of the following instruct the browser which stylesheet to use  
1
2
3
4
. <xml-stylesheet type="text/xsl" href="cd.xsl">  
. <xml-stylesheet type="text/xsl" xsl="cd.xsl">  
. <?xml-stylesheet type="text/xsl" href="cd.xsl"?>  
. <?xml-stylesheet type="text/xsl" xsl="cd.xsl"?>  
Level: Difficult  
8
1
2
3
4
8: Which of the following XSLT Patterns is used to match any descendant nodes  
) /  
) //  
) .  
) ..  
Level: Medium  
8
1
2
3
4
9: Which of the following XSLT Patterns is used to match the parent node  
) /  
) //  
) .  
) ..  
Level: Medium  
Page 17 of 17  
ACTS National Resource Center, Pune  
Question Bank – XML (Solved/Unsolved)  
9
1
2
3
4
0: Which of the following is a valid XSLT iteration command  
) for  
) for-all  
) for-each  
) in-turn  
Level: Medium  
9
1.What is an advantage of XML compared to HTML?  
) XML works on more platforms.  
XML is suited to using Web pages as front ends to databases.  
) XML was designed for portable phones.  
) XML is simpler to learn than HTML.  
1
2
3
4
)
Level: Difficult  
9
3
2.The following best describes the development of XML.  
1. XML developed from HTML because WEB browsers became more powerful.  
2. XML is designed as a replacement because SGML can not be used for document  
development.  
. XML builds on HTMLs ability to provide content to virtually any audience by adding the power  
of intelligent content.  
4. XML is the modern replacement for HTML and SGML, taking the good points from each,  
making both of those languages obsolete.  
Level: Medium  
9
9
9
3) The correct priority for implementing XML based IETMs is :  
1
2
3
4
. Develop DTD, conduct a pilot project, create a modular library, train staff.  
. Train staff, convert legacy documents, develop DTD, create modular library.  
. Conduct pilot program, train staff, create modular library, develop DTD  
. Conduct pilot program, train staff, develop DTD, convert documents, purchace XML  
tools.  
Level: Difficult  
4. Which of the following statements is true:  
1
2
3
4
5
. XML is a direct subset of SGML  
. SGML is an application of HTML  
. XML is a kind of dynamic HTML  
. XHTML is XML rewritten in HTML  
. SGML and XML are the same thing  
Level: Difficult  
5. What is a qualified name?  
1
2
3
4
.
.
.
.
Any name conforming to the XML Names specification  
A name having prefix and local name separated by a colon  
A name applying only to qualified elements and attributes  
None of the above  
Level: Dfficult  
Page 18 of 18  
ACTS National Resource Center, Pune  
Question Bank – XML (Solved/Unsolved)  
9
6. What is a NCName  
1
2
3
4
.
.
.
.
A Non-Common Name  
A Non-Conforming Name  
A Non-Colonized Name  
None of the above  
Level:Difficult  
9
7. If a namespace is attached to an element by prefix, what is the effect on non-prefixed child  
elements  
1
2
3
.
.
.
Nothing  
The namespace affects the immediate nonprefixed child elements, but no others  
The namespace affects all child elements of the element to which the namespace is  
attached no matter what level.  
4
.
None of the above  
Level:Difficult  
9
9
8. What is the default namespace  
1
2
3
4
.
.
.
.
The namespace used by default when no namespace is declared  
The namespace used when two or more namespaces are referenced  
A namespace that is referenced with the xmlns attribute, but without a prefix  
None of the above  
Level:Difficult  
9.What is an XML namespace?  
1
.
A set of names applied to specific spaces within an XML document, such as the head  
and body  
2
3
4
.
.
.
A set of names representing a specific XML vocabulary  
A set of names for XML documents pertaining to a particular vocabulary  
None of the above.  
Level:Difficult  
1
00. From what set of names do NCNames derive?  
1
2
3
4
.
.
.
.
Any combination of characters allowable in XML  
Any names conforming to XML Names, minus the colon  
Any names for elements and attributes within the DTD to which the namespace refers  
None of the above.  
Level:Difficult  
Q.4. Match the following  
Page 19 of 19  
ACTS National Resource Center, Pune  
Question Bank – XML (Solved/Unsolved)  
1
.
1
2
. Inventor of the Web and HTML  
c
a. James Clark  
. Marries HTML and XML  
d
b. Goldfarb  
3
4
. First line in an XML document  
. Came up with the name XML  
e
c. Berners-Lee  
d. XHTML  
a
5
. GML and SGML author  
b
e. XML declaration  
2
.
d
1. Generated if XML is not well formed a. selector  
e
f
2. Value for display property  
3. Element that contains no content  
4. 72 in an inch  
b. points  
c. DTD  
b
a
d. fatal error  
e. inline  
5. Indicates element to apply style to  
f. empty  
element  
c
6. Document Type Definition  
3
.
d
e
f
1. Document type declaration  
2. Children of a parent element  
3. Element declaration  
a. PCDATA  
b. CDATA section  
c. &lt;  
c
a
4. Built-in XML entity  
d. <!DOCTYPE…  
e. siblings  
5. Parsed character data  
Page 20 of 20  
ACTS National Resource Center, Pune  
Question Bank – XML (Solved/Unsolved)  
6
. Hides markup from an XML  
processor  
b
a. <!ELEMENT…  
4
5
6
.
.
.
C
1. CSS visibility property  
a. base16  
d
f
2. generic font name  
b. rgb(0,0,0)  
c. hidden  
3. zero or more instance repetition operator  
4. functional notation  
b
a
e
d. sans-serif  
e. or  
5. Hexadecimal  
6. Vertical bar (  
|)  
f. asterisk (*)  
d
e
1. attribute declaration  
2. a tokenized attribute type  
3. string attribute type  
a. CDATA  
b. NOTATION  
c. #FIXED  
a
4
. attribute and default value must always  
be provided  
c
d. <!ATTLIST>  
e. IDREF  
b
5. an enumerated attribute type  
d
e
1. unparsed entity  
a. &#x0041;  
b. &lt;  
2. conditional section  
3. built-in or predefined entity  
4. character reference  
5. parameter entity  
b
a
c. %name;  
d. Word file  
e. <![IGNORE[  
C
Page 21 of 21  
ACTS National Resource Center, Pune  
Question Bank – XML (Solved/Unsolved)  
7
.
e
1. urn:wyeast-comm:db  
a. #FIXED  
2
. Can share the same name if in different  
elements  
d
b. prefix  
c. URL  
f
c
b
a
3. For declaring a namespace  
4. http://wyeast.net/tack  
5. db:  
d. attribute  
e. URN  
f. xmlns  
6. Used to declare a default in a DTD  
8
.
d
c
1. XML Schema predecessor  
2. part of an annotation  
a. simple type  
b. decimal  
e
3. immediate child of <schema>  
4. a built-in datatype  
c.  
<
appinfo>  
b
a
d. DTD  
5. no attributes, other elements as content  
e. global  
9
.
1
. instructions for transforming an XML  
document  
D
a. @*  
e
b
a
c
2. formats XML documents  
3. transforms XML documents  
4. location path for all attribute nodes  
5. XSLT element  
b. XSLT  
c. <xsl:text>  
d. template  
e. XSLFO  
Page 22 of 22  
ACTS National Resource Center, Pune  
Question Bank – XML (Solved/Unsolved)  
10.  
c
e
1. Marriage of XML and HTML  
a. whitespace  
b. XHTML  
namespace  
2. Contains deprecated elements and attributes  
3
. All XHTML elements and attributes must be  
in this form  
c. XHTML  
d
a
4. Avoid in attribute values  
d. lowercase  
e. transitional  
DTD  
b
5. http://www.w3.org/1999/xhtml  
Q.4. Answers the following questions: (3 Mark each)  
1
2
3
4
5
6
7
8
9
1
)
)
)
)
)
)
)
)
)
Describe the role that XSL can play when dynamically generating HTML pages from a relational database.  
Give a few examples of types of applications that can benefit from using XML.  
What is DOM and how does it relate to XML?  
What is SOAP and how does it relate to XML?  
Can you walk us through the steps necessary to parse XML documents?  
Give some examples of XML DTDs or schemas that you have worked with.  
Using XSLT, how would you extract a specific attribute from an element in an XML document?  
When constructing an XML DTD, how do you create an external entity reference in an attribute value?  
How would you build a search engine for large volumes of XML data?  
0) Describe the differences between XML and HTML.  
Page 23 of 23  
JAVA XML MOCK TEST  
Copyright © tutorialspoint.com  
This section presents you various set of Mock Tests related to JAVA XML Framework. You can  
download these sample mock tests at your local machine and solve offline at your convenience.  
Every mock test is supplied with a mock test key to let you verify the final score and grade yourself.  
JAVA XML MOCK TEST I  
Q 1 - What XML stands for?  
A - Extra Marked Language  
B - Extensible Markup Language  
C - Extensible Marked Literal  
D - Extra Markup Language  
Q 2 - Which of the following is true about XML?  
A - XML is technology independent. It can be used by any technology for data storage and  
transmission purpose.  
B - XML uses simple text format. It is human readable and understandable.  
C - Using XSD, DTD and XML structure can be validated easily.  
D - All of the above.  
Q 3 - Which of the following is true about XML?  
A - XML is a markup language.  
B - XML is a tag based language like HTML.  
C - XML tags are not predefined like HTML.  
D - All of the above.  
Q 4 - Which of the following parses the document by loading the complete contents of  
the document and creating its complete hiearchical tree in memory?  
A - Dom Parser  
B - SAX Parser  
C - JDOM Parser  
D - StAX Parser  
Q 5 - Which of the following parses the document on event based triggers and does  
not load the complete document into the memory?  
A - Dom Parser  
B - SAX Parser  
C - JDOM Parser  
D - StAX Parser  
Q 6 - Which of the following parses the document in similar fashion to DOM parser but  
in more easier way?  
A - Dom Parser  
B - SAX Parser  
C - JDOM Parser  
D - StAX Parser  
Q 7 - Which of the following parses the document in similar fashion to SAX parser but  
in more efficient way?  
A - Dom Parser  
B - SAX Parser  
C - JDOM Parser  
D - StAX Parser  
Q 8 - Which of the following parses the XML based on expression and is used  
extensively in conjuction with XSLT?  
A - XPath Parser  
B - SAX Parser  
C - JDOM Parser  
D - StAX Parser  
Q 9 - Which of the following provides options to parse XML, XPath and XSLT using  
Java Collections Framework and provides support for DOM, SAX and JAXP?  
A - XPath Parser  
B - DOM4J Parser  
C - JDOM Parser  
D - StAX Parser  
Q 10 - Which of the following component represent base datatype of the DOM in DOM  
Parsing?  
A - Node  
B - Element  
C - Attr  
D - Document  
Q 11 - Which of the following component represent actual content of an element or  
attribute in DOM Parsing?  
A - Text  
B - Element  
C - Attr  
D - Document  
Q 12 - Which of the following method returns the root element of the document in  
DOM Parsing?  
A - Node.getRoot  
B - Document.getDocumentElement  
C - Node.getFirstChild  
D - Node.getLastChild  
Q 13 - Which of the following method returns the first child of a given Node in DOM  
Parsing?  
A - Node.getChild  
B - Document.getFirstChild  
C - Node.getFirstChild  
D - Node.getLastChild  
Q 14 - What DOM stands for?  
A - Direct Object Model  
B - Document Object Modeling  
C - Document Object Model  
D - Document Output Model  
Q 15 - Which of the following is true about DOM?  
A - It is an official recommendation of the World Wide Web Consortium W3C.  
B - It defines an interface that enables programs to access and update the style, structure,and  
contents of XML documents.  
C - XML parsers that support the DOM implement DOM interface.  
D - All of the above.  
Q 16 - Which of the following is true about DOM Parser?  
A - When you parse an XML document with a DOM parser, you get back a tree structure that  
contains all of the elements of your document.  
B - The DOM Parser provides a variety of functions you can use to examine the contents and  
structure of the document.  
C - Both of the above.  
D - None of the above.  
Q 17 - Can we create an XML document using DOM parser?  
A - true  
B - false  
Q 18 - What SAX stands for?  
A - Solve Analyze XML  
B - Simple API for XML  
C - Streaming API for XML  
D - Simple Analyze XML  
Q 19 - Which of the following is true about SAX parsing?  
A - SAX is an event-based parser for xml documents.  
B - Unlike a DOM parser, a SAX parser creates no parse tree.  
C - Both of the above.  
D - None of the above.  
Q 20 - Which of the following is true about SAX parsing?  
A - SAX parser reads an XML document from top to bottom, recognizing the tokens that make up  
a well-formed XML document.  
B - SAX parser reports the application program the nature of tokens that the parser has  
encountered as they occur  
C - The application program provides an 'event' handler that must be registered with the parser.  
D - All of the above.  
Q 21 - Can we create an XML document using SAX parser?  
A - true  
B - false  
Q 22 - Which of the following method get called when document begins in SAX  
parsing?  
A - startDocument  
B - endDocument  
C - startElement  
D - endElement  
Q 23 - Which of the following method get called when document ends in SAX parsing?  
A - startDocument  
B - endDocument  
C - startElement  
D - endElement  
Q 24 - Which of the following method get called when element starts in SAX parsing?  
A - startDocument  
B - endDocument  
C - startElement  
D - endElement  
Q 25 - Which of the following method get called when element ends in SAX parsing?  
A - startDocument  
B - endDocument  
C - startElement  
D - endElement  
ANSWER SHEET  
Question Number Answer Key  
1
2
B
D
3
4
5
6
7
8
9
1
1
1
1
1
1
1
1
1
1
2
2
2
2
2
2
D
A
B
C
D
A
B
A
A
B
C
C
D
C
A
B
C
D
B
A
B
C
D
0
1
2
3
4
5
6
7
8
9
0
1
2
3
4
5
Loading [MathJax]/jax/output/HTML-CSS/jax.js  
1
.Which are the main features of XML?  
a. Text data description  
b. Human- and computer-friendly format  
c. Handles data in a tree structure having one-and only one-root element  
d. All mentioned above  
ans:d  
2
.Which is a language for finding information in an XML document?  
a. Xpath  
b. XSLT  
c. XLink  
d. XPointer  
ans:a  
3
.Find the correct syntax of the declaration which defines the XML Version?  
a. < ?xml version= "1.0" ? >  
b. < xml version="1.0"/ >  
c. < ?xml version="1.0" / >  
d. None of the above  
ans:a  
4
.An XML DOM parser converts an XML document into an XML DOM object, which can then be  
manipulated with JavaScript.  
a.True b.False  
ans:a  
5
. Abbreviate the term DOM?  
a. Developed Object Model  
b. Document Object Model  
c. Document Oriented Model  
ans:b  
6
.Which language is case sensitive?  
a. HTML  
b. XML  
c. Both A & B  
d. None of the above  
ans:b  
7
.Which parser is read only?  
a.DOM  
b.SAX  
c.Both  
d.None  
ans:b  
8
.The getElementsByTagName() method is used to retrieve data from an XML document.  
a. True  
b. False  
ans:a  
9
<
<
<
<
. The following example shows which XML Syntax rule,  
note date=" 12/11/2007">  
to>Tove< /to>  
from>Jani< /from>  
/note>  
a. XML Attribute Values Must be Quoted  
b. All XML Elements Must Have a Closing Tag  
c. XML Tags are Case Sensitive  
d. XML Elements Must be Properly Nested  
ans:all the above  
1
0. XML is ?  
a. Platform Independent  
b. Language Independent  
c. Both A & B  
d. None of the above  
ans:c  
1
1. Which are the techniques for defining the structure of a specific type of XML documents?  
a. Schema  
b. DTD  
c. Both A & B  
d. None of the above  
ans:c  
1
2.Which is not a XML function?  
a. Transport information  
b. Style information  
c. Store information  
d. Structure information  
ans:b  
1
<
<
<
<
<
3. Is this a 'well formed' XML document?  
?xml version="1.0"? >  
note >  
to age="29" >John< /to >  
from >Smiley< / from >  
/ note >  
a. True  
b. False  
ans:a  
1
4.Which character in the XML Element will generate an error because the parser interprets it as the  
start of a new element?  
a. " < "  
b. "&"  
c. Both A & B  
d. None of the above  
ans:a  
1
5. Which is not a W3C-recommended specification?  
a. SAX  
b. DOM  
c. Both A & B  
d. None of the above  
ans:a  
1
6. Which internet language is used for describing available web services in XML?  
a. WSDL  
b. RSS  
c. RDF  
d. OWL  
ans:a  
1
7.XML is the most common tool for data transmissions between all sorts of applications  
a. True  
b. False  
ans:a  
1
8. Which is a software- and hardware-independent tool for carrying information?  
a. HTML  
b. XML  
c. Both A & B  
d. None of the above  
ans:b  
1
9.Which Characters are illegal in XML elements?  
a. " < "  
b. "&"  
c. Both A & B  
d. None of the above  
ans:c  
2
0. What is XML used to simplify?  
a. Data storage  
b. Data sharing  
c. Both A & B  
d. None of the above  
ans:c  
2
1.Which are the XML Syntax rules?  
a. All XML Elements Must Have a Closing Tag  
b. XML Tags are not Case Sensitive  
c. XML Elements Must be Properly Nested  
d. Both A & C  
ans:d  
2
2. XML documents must contain a root element; this element is "the parent" of all other elements  
a. True  
b. False  
ans:a  
2
3.XML is designed to store data and _____.  
a. Design  
b. Verify  
c. Transport  
d. Both A & B  
ans: c  
2
4.XML attribute values must always be enclosed in quotes  
a. True  
b. False  
ans:a  
2
5.XML is designed to carry data, and to display data  
a. True  
b. False  
ans:b  
2
6.In XML document comments are given as?  
a. < !-- -->  
b. < !-- ?  
c. < /-- -->  
d. < ?-- ?  
ans:a  
2
7.Which of the following is true about SAX parsing?  
a. SAX parser reads an XML document from top to bottom, recognizing the tokens that make up a  
well-formed XML document.  
b. SAX parser reports the application program the nature of tokens that the parser has encountered  
as they occur  
c. The application program provides an 'event' handler that must be registered with the parser.  
d.All of the above.  
ans:d  
2
8.Which of the following method get called when element ends in SAX parsing?  
a. startDocument()  
b.endDocument()  
c.startElement()  
d. endElement()  
ans:d  
2
9. Which method of JDOM Parser gets the root element of the XML?  
a. Element.getRootElement()  
b. Document.getRootElement()  
c. Node.getRootElement()  
d.Node.getChild(Name)  
ans:b  
3
0.Which technology provides the flexibility to swap between XML processors with no application  
code changes?  
a. JAAS  
b. SAX  
c. XSLT  
d. JAXP  
ans:d  
1
.How to declare element with minimum one occurrence?  
a.<! ELEMENT element-name(element-content+)>  
b.<! ELEMENT element-name(element-content+)!>  
c.<! ELEMENT element-name(element-content)!>  
d.None of the listed options  
ans:a  
2
.Which of the following XML statement is valid?  
a.<message> if price<60</message>  
b.<message> if price lt 60 </message>  
c.<message> if price &lt; 60</message>  
d.None of the listed options  
ans:c  
3
.DTD stands for  
a.Document Type Definition  
b.Direct Type Definition  
c.Dynamic Type Definition  
d.None of these  
ans:a  
4
.Which of the following correctly defines use of DTD in XML development?  
a.DTD are used by parsers for validating the structure of the XML  
b.DTD are used as contract between two systems to interoperate.  
c.An Application can use the DTD to validate the XML structure it has received from external systems  
d.All the above  
ans:d  
5
.Any text that should not be parsed by the xml parser needs to declare as:  
I: PCDATA  
II: CDATA  
a.I  
b.II  
c.Both I and II  
d. None of the above  
ans:b  
6
.What is an XML instance  
a.An XML Document  
b.An XML element  
c.An XML attribute  
ans:a  
7
1
2
3
.What are the uses of XML parsers?  
.Parsing XML files and retrieving data from XML elements  
.Creating XML files programmatically  
.Used to direct conversion using an XSLT processor  
a.1&2  
b.2  
c.1&3  
d.2&3  
ans:a  
8
.Which parser reads small chunk of document at a time,parses it, generate an events and then  
reads another chunk of document?  
a.DOM  
b.SAX  
c.Both  
d.none  
ans:b  
9
.Which defines standard set of objects for creating XML's?  
a.SAX  
b.XML DOM  
c.XML  
d.SAX DOM  
ans:b  
1
0.Which type of parser is suitable,when applications is required to read data without modifying the  
content?  
a.DOM  
b.SAX  
c.Both  
d.None  
ans:b  
1
1.Which statement creates DocumentBuilder instance?  
a.DocumentBuilder b=new DocumentBuilder();  
b.DocumentBuilder b=new Builder();  
c.DocumentBuilder b=factory.new DocumentBuilder();  
d.None  
ans:c  
1
2.What does XSL stands for?  
a.Extensive Style sheet language  
b.Extensible Style Language  
c.Extensible Style Sheet Language  
d.None  
ans:c  
1
3.Which statement creates DocumentBuilderFactory instance?  
a.DocumentBuilderFactory f=new DocumentBuilderFactory();  
b.DocumentBuilderFactory f= BuilderFactory.newInstance();  
c.DocumentBuilderFactory f=DocumentBuilderFactory.newInstance();  
ans:c  
1
4.Which language is used for formatting XML documents?  
a.XSL  
b.XSLT  
c.XSL-FO  
ans:c  
1
5.Which is used to transform XML document?  
a.Xpath  
b.XSLT  
c.XML  
d.XSL  
ans:b  
1
1
2
3
6.What are the two common exceptions in JAXP?  
.ParserConfigurationException  
.FactoryConfigurationException  
.FactoryConfigurationError  
a.1&2  
b.3  
c.1&3  
d.1  
ans:c  
1
7.JAXP Stands for  
a.Java API eXtensive processing  
b.Java API eXtensible Processing  
c.Java API for XML Processing  
d.Java API for XML Parsing  
ans:c  
1
8.In which package JAXP related API's are available?  
a.javax.xml.parsers.*;  
b.javax.xml.*;  
c.javax.parsers.xml.*;  
ans:a  
1
9.Which complex type specifies that the elements should always be in the order specified?  
a.<xs:complexType name="CountrInfo">  
<xs:all>  
<xs:element name="countryName" type="xs:string"/>  
<xs:element name="states" type="xs:integer"/></xs:all>  
</xs:complexType>  
b.<xs:complexType name="CountrInfo"><xs:choice> <xs:element name="countryName"  
type="xs:string"/>  
<
xs:element name="states" type="xs:integer"/></xs:choice>  
/xs:complexType>  
c.<xs:complexType name="CountrInfo">  
<
<xs:sequence> <xs:element name="countryName" type="xs:string"/>  
<xs:element name="states" type="xs:integer"/>  
</xs:sequence></xs:complexType>  
ans:c  
2
0.Which statement specifies a constant value for a simple element?  
a.<xs:element name="CountryName" type="xs:string" constant="India"/>  
b.<xs:element name="CountryName" type="xs:string" fixed="India"/>  
c.<xs:element name="CountryName" type="xs:string" fixedvalue="India"/>  
ans:b  
2
1.Which complex type signifies that only one of the child elements can appear?  
a.<xs:complexType name="CountrInfo">  
<xs:all>  
<xs:element name="countryName" type="xs:string"/> <xs:element name="states"  
type="xs:integer"/></xs:all>  
/xs:complexType>  
b.<xs:complexType name="CountrInfo">  
<
<
<
<
<
xs:choice>  
xs:element name="countryName" type="xs:string"/>  
xs:element name="states" type="xs:integer"/>  
/xs:choice></xs:complexType>  
c.<xs:complexType name="CountrInfo">  
<
xs:sequence> <xs:element name="countryName" type="xs:string"/>  
xs:element name="states" type="xs:integer"/></xs:sequence></xs:complexType>  
ans:b  
<
2
2.Which method of DocumentBuilder is used to parse the xml file?  
a.parse  
b.read  
c.parseXML  
ans:a  
2
3.In XML DOM every XML element is treated as Node.  
a.True b.False  
ans:a  
2
4.Which method is used to get the element type of a XML document?  
a.node.getNodeType()  
b.node.getElementType()  
c.node.getType()  
ans:a  
2
5.Which statement is true?  
a.All XML elements must be lower case  
b.All XML documents must have a DTD  
c.All XML elements must be properly closed  
d.All the statements are true  
ans:c  
2
6.Which statement is NOT true?  
a.White-space is not preserved in XML  
b.XML documents must have a root tag  
c.XML tags are case sensitive  
d.XML elements must be properly nested  
ans:a  
2
7.XML elements cannot be empty  
a.False b.True  
ans:a  
2
8.Which is not a correct name for an XML element?  
a.<1dollar>  
b.<h1>  
c.<Note>  
d.All 3 names are incorrect  
ans:a  
2
8.For the XML parser to ignore a certain section of your XML document, which syntax is correct?  
a.![CDATA[ Text to be ignored ]]>  
b.<CDATA> Text to be ignored </CDATA>  
c.<xml:CDATA[ Text to be ignored ]>  
d.<PCDATA> Text to be ignored </PCDATA>  
ans:a  
2
9.What are XML entities used for?  
a.Entities define shortcuts to standard text or special characters bEntities define shortcuts to  
standard elements  
c.Entities define shortcuts to standard attributes  
ans:a  
3
0. Which XML DOM object represents a node in the node tree?  
a.The node object  
b.The nodeList object  
c.The document object  
ans:a  
1
1
2
3
4
.Which of following statements is/are False?  
. XML overcomes the limitations in HTML to support a structured way of organizing content.  
. XML specification is not case sensitive while HTML specification is case sensitive.  
. XML supports user defined tags while HTML uses pre-defined tags.  
. XML tags need not be closed while HTML tags must be closed.  
a.2 only  
b.1 only  
c.2 and 4  
d.3 and 4  
ans:c  
2
.Consider an XML file called intro.xml and a document type defintion (DTD) file intro.dtd as follows:  
intro.xml  
<
<
<
<
<
?xml version = "1.0"?>  
!DOCTYPE myMessage SYSTEM "intro.dtd"›  
myMessage>  
message>Welcome to XML</message>  
/myMessage>  
intro.dtd  
<
! ELEMENT myMessage (message)>  
! ELEMENT message (#PCDATA)>  
<
A validating parser will classify intro.xml as  
a.Well-formed and validated  
b.Well-formed but not validated  
c.Validated but not well-formed  
ans:a  
3
.Given below is an excerpt of an xml specification.  
Book>  
<
<
<
<
<
<
<
<
<
title> GATE 2005 </title>  
type value = "BROCHURE"/>  
accno>10237623786</accno>  
/Book>  
Book>  
type value = "FICTION"/>  
accno>0024154807</accno>  
/Book>  
Given below are several possible excerpts from "library.dtd". For which excerpt would the above  
specification be valid?  
a.<!ELEMENT Book (title+, type, accno)>  
<
!ELEMENT title (#PCDATA)>  
!ELEMENT type EMPTY>  
<
<!ATTLIST type value (BROCHURE/FICTION/TECHNICAL)> <!ELEMENT accno (#PCDATA)>  
b.  
<
!ELEMENT Book (title?, type, accno)>  
!ELEMENT title (#PCDATA)> <!ELEMENT type ATTLIST> <!ATTLIST type value  
<
(BROCHURE/FICTION/TECHNICAL)> <!ATTLIST accno value (#PCDATA)>  
c.  
<
!ELEMENT Book (title*, type, accno)>  
!ELEMENT title (#PCDATA)> <!ELEMENT type ATTLIST> <!ATTLIST type value  
<
(BROCHURE/FICTION/TECHNICAL)> <!ELEMENT accno (#PCDATA)>  
d.  
<
!ELEMENT Book (title?, type, accno)>  
!ELEMENT title (#PCDATA)> <!ELEMENT type EMPTY> <!ATTLIST type value  
<
(BROCHURE/FICTION/TECHNICAL)> <!ELEMENT accno (#PCDATA)>  
ans:a  
4
.Which of the following is TRUE only of XML but NOT HTML?  
a.It is derived from SGML  
b.It describes content and layout  
c.It allows user defined tags  
d.It is restricted only to be used with web browser  
ans:a,c  
5
.Which of the following statements are true with reference to the way of describing XML data?  
(
a)XML uses DTD to describe the data  
b)XML uses XSL to describe the data (c)  
(
XML uses a description node to describe the data Codes:  
a.(a) only  
b.(b) only  
c.(a) and (b)  
d.(a) and (c)  
ans:d  
6
.In XML we can specify the frequency of an element by using the symbols:  
a.+ * !  
b.# * !  
c.+* ?  
d.-*?  
ans:c  
7
.The definitions in an XML document are said to be __________ when the tagging system and  
definitions in the DTD are all in compliance.  
a.well-formed  
b.reasonable  
c.valid  
ans:c  
8
.The behaviour of the document elements in XML can be defined by  
a.Using document object  
b.Registering appropriate event handlers  
c.Using element object  
d.All of the above  
ans:b  
9
. Which is a valid XML comment?  
a.<!It is comment section >  
b.<!It is comment section >  
c.<!It is comment section>  
d.<!It is comment section !>  
ans:b  
1
0.An XML element can contain  
a.text  
b.attributes  
c.other elements  
d. mix of the above  
ans:d  
1
1.In XML, you can indicate an empty element like this:  
a.<element></element>  
b.<element/>  
c.a and b  
d.none  
ans:c  
1
2.XML namespaces avoid element naming conflict.  
a.True b.False  
ans:a  
1
3.What is true about XML Schema?  
a. It is used to describe and validate the structure and the content of XML data.  
b. XML schema defines the elements, attributes and data types.  
c. It is similar to a database schema that describes the data in a database.  
d. All of the above  
ans:d  
1
4.How an element can be defined within an XSD?  
a. <xs:element name = "x" type = "y"/>  
b. <?xs:element name = "x" type = "y"/>  
c. <xs:element name = "x" type = "y">  
d. </xs:element name = "x" type = "y"/>  
ans:a  
1
5._______ element is used only in the context of the text.  
a. Complex Type  
b. Simple type  
c. Global Types  
d. All of the above  
ans:b  
1
6.Which of the following are correct predefined simple types?  
a. xs:integer  
b. xs:char  
c. xs:float  
d. xs:bool  
ans:a  
1
7.Attributes have _______ property.  
a. name  
b. type  
c. Both A and B  
d. None of the above  
ans:c  
1
8.Simple type Built into Schema "data" represent a date in?  
a. MM-DD-YY  
b. DD-MM-YYYY  
c. YY-MM-DD  
d. YYYY-MM-DD  
ans:d  
1
9. XML uses the features of  
a.HTML  
b.XHTML  
c.VML  
d.SGML  
ans:d  
2
0.What are the parsers supported in XML?  
a.non validating and validating  
b.well documented  
c.well formed  
d.none of the above  
ans:a  
2
1.Which of the following strings is a correct XML name?  
a._myElement  
b.my Element  
c.#myElement  
d.None of the above  
ans:a  
2
2.Which of the following are well formed XML fragments?  
a.< myElement myAttribute="someValue’/>  
b.< myElement myAttribute=someValue/>  
c.< myElement myAttribute=’someValue’>  
d.< myElement myAttribute="someValue"/>  
ans:d  
2
3.Any XML must have:-  
a.Closing tag  
b.Root element  
c.Nested child  
d.both a and b  
ans:d  
2
4.How to specify the attributes with multiple values?  
a.< myElement myAttribute="value1" myAttribute="value2"/>  
b.< myElement myAttribute="value1 value2"/>  
c.attributes cannot have multiple values  
d.< myElement myAttribute="value1, value2"/>  
ans:c  
2
5.In terms of performance, which of the following parsers are more suitable?  
a.DOM  
b.SAX  
ans:b  
2
6.Is it easier to process XML than HTML?  
a.No  
b.Yes  
c.Sometimes  
d.Can’t say  
ans:b  
2
7. In XML, what is identified by a URI reference?  
a.XML namespace  
b.XSLT  
c.Schema  
d.DLT  
ans:a  
2
<
8. An element is declared as ANY in the DTD as  
!ELEMENT BODY ANY>. Which are all valid element declaration?  
a.<BODY> sometext</BODY>  
b.<BODY>  
<elements>  
<elements>  
</BODY>  
c.<BODY>  
sometext  
<elements>  
<elements>  
</BODY>  
d.All are valid  
ans:d  
2
<
9.An element is declared as  
!ELEMENT test ( sample +, conclusion )> in DTD. Which element is valid in XML document?  
a.<test>  
<sample>……..</sample>  
<sample>……..</sample>  
<conclusion>…</conclusion>  
</test>  
b.<test>  
<conclusion>…</conclusion>  
</test>  
c.<test>  
<sample>……..</sample>  
<conclusion>…</conclusion>  
</test>  
d.<test>  
<conclusion>…</conclusion>  
<sample>……..</sample>  
</test>  
ans:a,c  
3
<
<
0.What is the meaning of this declaration in DTD?  
!ELEMENT Student ( name, age)>  
!ATTLIST Student no CDATA #REQUIRED >  
a.Student element should have two attributes name and age  
b.Student element should not have any CDATA  
c.Student element should have an attribute no  
d.Student element should have name and age as child elements,attribute no is mandatory  
ans:d  
3
1. Which of the following statements are true?  
a.DOM is event based and SAX is object based  
b.DOM is object based and SAX is event based  
c.Both are object based  
d.Both are event based  
ans:b  
3
1
2
2. Which of the following statemetns are true?  
.org.w3c.dom defines Document class (a DOM) as well as classes for all the components of a DOM  
.org.xml.sax defines the basic SAX APIs.  
3
.javax.xml.parsers is the JAXP APIs, which provide a common interface for different vendors' SAX  
and DOM parsers.  
a.1 and 2  
b.2 and 3  
c.1 and 3  
d. All are true  
ans:d  
3
1
3. State which of the following statements are true.  
.A resource class is a Java class that uses JAX-RS annotations to implement a corresponding Web  
resource.  
2
.Resource classes are POJOs that have at least one method annotated with @Path or a request  
method designator.  
a. 1 is true and 2 is false  
b. 2 is true and 1 is false  
c. Both are true  
d. Both are false  
ans:c  
3
4.Which annotation is used to extract the value of a URI template parameter?  
a.@QueryParam  
b.@FormParam  
c.@PathParam  
d.@HeaderParam  
ans:c  
3
5.Only public methods may be exposed as resource methods.State True/False.  
a.True b. False  
ans:a  
3
6.Conversion between an entity body and a Java type is the responsibility of  
a.Entity  
b.EntityProvider  
c.Resource class  
d.None  
ans:b  
3
1
7.State whether the following statements are true/false.  
.The MessageBodyReader interface defines the contract between the JAX-RS runtime and  
components that provide mapping services from representations to a corresponding Java type.  
2
.The MessageBodyWriter interface defines the contract between the JAX-RS runtime and  
components that provide mapping services from a Java type to a representation.  
a.1 only  
b.2 only  
c.1 and 2 are true  
d.1 and 2 are false  
ans:c  
3
8.What is the status code returned by the server for bad request?  
a.400  
b.401  
c.403  
d.404  
ans:a  
3
9.What is XSRF/CSRF?  
a.Cross Site Response Forgery  
b.Cross Site Request Forgery  
c.Cross Site Rest Forgery  
ans:b  
4
0.Entities can have hyperlinks.  
a. True b.False  
ans:a  
4
1.The URI template for a resource method is given as follows:  
http://example.com/{name1}/{name2}/. What are the valid requests that can be send from client?  
a.http://example.com/jay/gatsby/  
b.http://example.com/jay/  
c.http://example.com/*  
ans:a  
4
2.Which of the following are valid URI templates?  
a.http://example.com/{question}/{question}/{question}/  
b.http://example.com/maps/{location}  
c.http://example.com/{name3}/home/  
d.All are valid  
e.None of the above are valid  
ans:d  
4
3.Which of the following is valid JSON declaration to represent a user with attributes id,name and  
profession?  
a.{  
"
"
"
id":1,  
name":"Mahesh",  
profession":"Teacher"  
}
b.[  
"
id":1,  
"
name":"Mahesh",  
profession":"Teacher"  
"
]
c.{  
id:1,  
name:"Mahesh",  
profession:"Teacher"  
}
d.{  
"
id":"1",  
"
name":"Mahesh",  
profession":"Teacher"  
"
}
ans:a  
4
4.SOAP is not tied to any specific transport protocol.  
a. True b.False  
ans:a  
4
5.XML-RPC is the simplest XML-based protocol for exchanging information between computers.  
a.True b. False  
ans:a  
4
6.You are going to develop Stock market web service which will be consumed by other companies.  
Java team from your company want to re-use your web service code as soon as possible. Which  
approach you will follow in this case?  
A. Top down (contract first)  
B. Meet in the middle  
C. Bottom up (code first)  
D. None of the above  
ans:c  
4
7.Our company want to create application in which servlet will be exposed as WS endpoint. What  
we will require among following? (any 3)  
A. Application needs to be packaged as JAR file.  
B. Application needs to be packaged as WAR file.  
C. web.xml is required.  
D. webservice.xml is required.  
E. WEB-INF directory is required.  
F. META-INF directory is required.  
ans:b c e  
4
8.Please select incorrect statement among following statements.  
a.Confidentiality - encrypting of SOAP messages  
b.Integrity - signing of SOAP messages  
c. Authentication - attach security tokens to SOAP messages  
d. Non-repudiation - signing of SOAP messages  
e. Authorization - attach identity tokens to SOAP message  
ans:e  
4
9.What are three benefits of using SSL to connect to a Web service ? (any 3)  
a. The server is assured of the client's identity if the client issues the certificate.  
b. The client is assured of the server's identity.  
c. Message integrity is preserved between the client and the server.  
d. The communication between the client and the server is still logged.  
e. The communication between the client and the server is encrypted.  
f. Using SSL over HTTP incurs less overhead than HTTPS.  
ans:a c e  
5
0.Which of the following methods are not Idempotent?  
a.Get  
b.Post  
c.Put  
d.Delete  
ans:b  
5
1.Which of these are not the elements WSDL ?  
a.Types  
b.Port Type  
c.Service  
d.destination  
ans:d  
5
2. Which of these test do use an HTTP POST and will send the XML response.  
a.<?xml version="1.0" encoding="utf-8" ?>  
short xmlns="http://tempuri.org/">38</short>  
b.<?xml ?>  
short xmlns="http://tempuri.org/">38</short>  
c.<?xml version="1.0" encoding="utf-8" ?>  
short xmlns="http://tempuri.org/">38  
<
<
<
d.<short xmlns="http://tempuri.org/">38</short>  
ans:a  
5
3.The Web services can not offer the application components like:  
a.currency conversion  
b.weather reports  
c.language translation  
d.web browsers  
ans:d  
5
4.The XML provides the ________ in which you can write the specialized languages to express the  
complex interactions between the clients and the services or between the components of a  
composite service.  
a.language  
b.metalanguage  
c.meta  
d.services  
ans:b  
5
5.Schema is an _____ based alternative for DTD.  
a.XHTML  
b.XSLT  
c.XSL  
d.XML  
ans:d  
5
6.XSLT is:  
a.Extensible Stylesheet Language Translators  
b.Extended Stylesheet Language Transformation  
c.Extensible Stylesheet Language Transformation  
d.Extensible Style Language Transformation  
ans:c  
5
7.What is a web service?  
a.A standard way of integrating web-based applications  
b.One type of service that can be part of a Service Oriented Architecture  
c.Programmable XML-based service  
d.All of the above  
ans: d  
5
8. Service Transport, XML Messaging, Service Description and Service Discovery are four layers of  
a.web service implementing client components  
b.web service protocol stack  
c.web service supporting repository  
d.web service supporting request and response components  
ans:b  
5
9.Web Services attempts to describe architecture based on  
a.Representational State Transfer (REST)  
b.Remote Procedure Calls  
c.Reusable Application Components  
d.None of the above  
ans:a  
6
0.Which of the following is an open source SOAP server and client?  
a.Apache ANT  
b.Apache Tomcat  
c.Jakarta Struts  
d.Apache Axis  
ans:b  
1
._______________ is used to convert your application into Web-Application.  
a. Java Service  
b.Browser Action  
c. Web Services  
d. Struts Services  
ans:-c  
2
.Web Services are _______________.  
a.Application Designing Tool  
b.Application IDE  
c.Application Components  
d.None of these  
ans:-c  
3
.The basic Web Services platform is combination of _____ and _______.  
a.CSS + JAVA  
b.CSS + HTTP  
c.XML + HTTP  
d.XML + HTML  
ans:-c  
4
.Web services communicate using __________.  
a.Open protocols  
b.Open-Close protocols  
c.Close protocols  
d.None of these  
ans:-a  
5
.Web services are self-contained and self-describing.  
a.False b.True  
ans:-b  
6
.Web services can be discovered using ________.  
a.UDDII b.UDDI c.UDII d.UDDDI  
ans:-b  
7
.__________ is the basis for Web services.  
a.PHP  
b.CSS  
c.CGI  
d.XML  
ans:-d  
8
.Which of the following is considered as Web Service Platform Elements ?  
a.SOAP  
b.UDDI  
c.WSDL  
d.All of these  
ans:-d  
9
.WSDL Stands for ______________________.  
a.Web Services Description Language  
b.Web Services Design Language  
c.Web Services Development Language  
d.None of these  
ans:-a  
1
0.UDDI Stands for ______________________.  
a.Universal Development, Design and Integration  
b.Universal Description, Discovery and Integration  
c.Universal Description, Development and Integration  
ans:-b  
1
1.Acronymn of SOAP is ______________.  
a.Simplified Object Arbitary Protocol  
b.Secure Object Access Protocol  
c.Simple Object Access Protocol  
d.None of these  
ans:-c  
1
2.Web-services were developed in order to interact _____________ .  
a.Server  
b.Browsers  
c.Different platforms  
ans:-c  
1
3.Web services use ________ to code and to decode data.  
a.XML  
b.SOAP  
c.UDDI  
d.None of these  
ans:-a  
1
4.Web Services is used to -  
a.Connect existing software  
b.Reuse application-components.  
c.Solve the interoperability problem  
d. All of these  
ans:-d  
1
5.SOAP is an _________ to let applications exchange information over HTTP.  
a.XML-based protocol  
b.JAVA-based protocol  
c.PHP-based protocol  
d.NET-based protocol  
ans:-a  
1
6.SOAP is a _________.  
a.Protocol  
b.Markup  
c.Carrier  
d.Language  
ans:-a  
1
7.SOAP is platform ___________.  
a.Dependent  
b.Independent  
c.None  
ans:-b  
1
8.SOAP is a format for sending messages and is also called as __________.  
a.Data Transfer protocol  
b.Communication protocol  
c.Network protocol  
d.None of these  
ans:-  
1
9.SOAP is a W3C standard ! (True / False)  
a.False b.True  
ans:-b  
2
0._________ is a directory for storing information about web services.  
a.SOAP  
b.CGI  
c.UDDI  
d.HTTP  
ans:-c  
2
1.XML digital signatures provides  
a.Authentication  
b.Authorization  
c.Confidentiality  
d.Integrity  
ans:-c  
2
2.What is RPC?  
a.Remote Process control  
b.Remote Procedure call  
c.Rempte Protocol control  
ans:-b  
2
2.What is SSL?  
a.Secure Socket Layer  
b.Secured Socket Layer  
c.Standard Secured Layer  
d.Standard Socket Layer  
ans:-a  
2
3.Select the communication channel not used in ws  
a.HTTP/POST  
b.MIME  
c.SOAP  
d.HTTP/GET  
ans:-b  
2
4.What is not a part of soap message?  
a.Soap body  
b.Soap envelope  
c.Soap headers  
d.Soap footer  
ans:-d  
2
5.Which of the following component of HTTP response contains metadata for the HTTP Response  
message as key-value pairs?  
a. Status/Response Code  
b. HTTP Version  
c. Response Header  
d. Response Body  
ans:-c  
2
6. Which of the following HTTP method should be read only in nature?  
a.GET  
b.DELETE  
c.POST  
d.PUT  
ans:-a  
2
7. Which of the following directive of Cache Control Header of HTTP response indicates that  
resource is not cachable?  
a.Public  
b.Private  
c.no-cache/no-store  
d.max-age  
ans:-c  
2
8.Which of the following HTTP Status code means NO CONTENT, when response body is empty for  
example, a DELETE request?  
a. 200  
b. 201  
c. 204  
d. 304  
ans:-  
2
9.Which of the following annotation of JAX RS API is used to annotate a method used to  
create/update resource?  
a. @Path  
b. @GET  
c. @PUT  
d.@POST  
ans:-d  
3
0. RESTful web services make use of FTP protocol as a medium of communication between client  
and server.  
a.True b.False  
ans:-b  
3
1.Response Header - Contains metadata for the HTTP Response message as key-value pairs.  
a.True b.False  
ans:-a  
3
2.Which of the following layer in Web Service Protocol Stack is responsible for centralizing services  
into a common registry and providing easy publish/find centralizing services into a common registry  
and providing easy publish/find functionality?  
a.Service Transport  
b.XML Messaging  
c.Service Description  
d.Service Discovery  
ans:-d  
3
3.Annotation which allows the Jaxb2Marshaller marshaller to detect a class’s (i.e., object’s) fields.  
a. XmlRootElement  
b. XmlRoot  
c. NotNull  
d. None of the mentioned  
ans:-a  
3
4.Which of the following is correct about URI in RESTful web services?  
a. Each resource in REST architecture is identified by its URI  
b. Purpose of an URI is to locate a resource(s) on the server hosting the web service  
c. Both of the above  
d. None of the above  
ans:-  
3
5. Annotation added as an input parameter to the handler method  
a. PathParam  
b. Path  
c PathLocale  
d. None of the mentioned  
ans:-d  
3
6. Each resource in REST architecture is identified by its URI.  
a.True b.False  
ans:-a  
3
7. Explain features of XML-RPC?  
a. RPCs are performed using simple XML language  
b. XML encoded Requests are sent via HTTP POST  
c. XML Response is embedded in HTTP response  
d. All of the above  
ans:-d  
3
8.XML tag which represents information related to a REST service’s request.  
a. Result  
b. Title  
c. a&b  
d. None  
ans:-c  
3
9.Some common Resources representations used in REST are  
a.JSON  
b.YAML  
c.XML  
d.HTML  
e. All the above  
ans:-e  
4
0.RESTful web services ?  
a. Defines its own security.  
b. Inherits security measures from the underlying transport.  
c. Both of the above  
d. None of the above  
ans:-b  
4
1.What is/are the advantages of RESTful Web Services.?  
a. Language and Platform independent  
b. REST can use SOAP  
c. Permits different data format  
d. All of the above  
ans:-d  
4
2.Which of the following annotation of JAX RS API states the HTTP Response generated by web  
service?  
a. @DELETE  
b. @HEAD  
c. @Produces  
d. @Consumes  
ans:-c  
4
3. _______________ is the java API for RESTful web services.?  
A. JAX-RS  
B. JAX-WS  
C. Both of the above  
D. None of the above  
ans:-a  
4
4. Select programming languages supported by Web Services  
a. c++  
b. Java  
c. Python  
d. C  
e. All of the above  
ans:-e  
4
5.Which two statements are true about the Web services? (any 2)  
a. SOAP messages are compressed during transport to reduce size of payload.  
b. You have to implement session tracking via HTTP cookies.  
c. The WSDL defines services as collections of network endpoints.  
d. All data shared between Java and non-Java components must be in XML format.  
e. Data interchange is done via in XML.  
ans:-c,e  
4
6.We have a Web Service that can respond with a Street name when receiving a House number.  
This service will be used on several mobile devices and size of payload should be small to consume  
less bandwidth. Which technologies can provide the best solution for this requirement? (any 3)  
a. XML  
b. JSON  
c. JAX-WS  
d. JAX-RS  
e. HTTP  
ans:-b,d,e  
4
7.Given a following code snippet of the service can you tell what is the name of the operation in  
WSDL file?  
@WebService(serviceName = "PayrollSystemService", name = "PayrollSystem", portName =  
"
PayrollSystemPort")  
public class PayrollSystem {  
public String getEmployeeDetails(Long empId) {  
return ""dummyDetails"";  
}
}
a. getEmployeeDetails  
b. getEmployeeDetailsOperation  
c. getEmployeeDetailsMethod  
d. getEmployeeDetailsWebMethod  
e. getEmployeeDetailsService  
ans:-a  
4
8. What is JAXB?  
a.Java API for XML Bean  
b.Java API for XML Binding  
c.Java API for XML Basics  
ans:-b  
4
9.Response entity is defined in which package?  
a.javax.ws.rs.core.Response  
b.javax.ws.rs.Response  
c.javax.ws.Response  
ans:-a  
5
0.Which is the discovery protocol?  
a.SOAP  
b.HTTP  
c.UDDI  
d.WSDL  
ans:-c  
1
.Our company wants to create JAX-WS Web service client for weather forcast service. This weather  
forcast service is implemented in C++. You have given a WSDL file for service. What is correct  
statement to be able to create WS client from WSDL.  
a. Use JAXP to parse and generate the java classes from WSDL. Then create Service Endpoint  
Interface(SEI) from factory classes. Then use SEI to call WS.  
b. Use wsgen to generate SEI from WSDL and then invoke SEI's methods to call WS.  
c. Use wsimport to generate SEI from WSDL and then invoke SEI's methods to call WS.  
d. We can not consume a web service created in C++ on java.  
ans:c  
2
.What is an best way of the handling of application exceptions thrown by a JAX-WS service  
endpoint?  
a. Exceptions should be mapped to faults in WSDL.  
b. Exceptions are NOT handled by JAX-WS clients.  
c. Exceptions are always propagated to JAX-WS clients as RemoteExceptions.  
d. Exceptions are always propagated to JAX-WS clients as WebServiceExceptions.  
e. Exceptions are always propagated to JAX-WS clients as SOAPFaultExceptions.  
ans:a  
3
.What is the correct definition of WSDL's port element?  
a. Contains data type definitions using type system.  
b. Description of an action supported by the service.  
c. Set of operations supported by one or more Endpoints.  
d. A single endpoint defined as a combination of a binding and a network address.  
ans:d  
4
.Which two statements are true about the Web services? (any 2)  
a. SOAP messages are compressed during transport to reduce size of payload.  
b. You have to implement session tracking via HTTP cookies.  
c. The WSDL defines services as collections of network endpoints.  
d. Data interchange is done via XML.  
ans:c,d  
5
.We want to develop a Web Service and after developing we understood result processing can take  
a long time to finish. So we decided to convert it to asynchronous method invocations. Is it possible  
to convert our synchronous Web Service to an asynchronous Web Service using SOAP?  
a. True b.False  
ans:a  
6
.Which of the following code snippet matches to this WSDL portType element?  
portType name="ElementsTableImpl">  
<
<operation name="getTable">  
<
<
<
input message="tns:getTable" />  
output message="tns:getTableResponse" />  
fault message="tns:WsException" name="WsException" />  
</operation>  
</portType>  
a.@WebService  
public class ElementsTableImpl {  
public SimpleElementsTable getElementsTable(Integer number) throws WsException {  
SimpleElementsTable table = new SimpleElementsTable(number);  
return table;  
}
}
b.@WebService  
public class ElementsTableImpl {  
public SimpleElementsTable getTable(Integer number) {  
SimpleElementsTable table = new SimpleElementsTable(number);  
return table;  
}
}
c.@WebService (endpointInterface="ElementsTableService")  
public class ElementsTableImpl {  
public SimpleElementsTable getTable(Integer number) throws WsException {  
SimpleElementsTable table = new SimpleElementsTable(number);  
return table;  
}
}
d.@WebService  
public class ElementsTableImpl {  
public SimpleElementsTable getTable(Integer number) throws WsException {  
SimpleElementsTable table = new SimpleElementsTable(number);  
return table;  
}
}
ans:d  
7
.Select HTTP methods associate with SOAP Web service.  
a. Put  
b. Post  
c. Get  
d. Delete  
ans:b  
8
.Select the operations supported by Web Services.  
a. One way (Request only)  
b. Two way (Request - Response)  
c. Solicit-Response (Server push message and client responds)  
d. Notification (Request/message from server to client)  
e. All of the above  
ans:e  
9
.Select statements which are true for SOAP. (any 3)  
a. SOAP is specification for exchanging structured information  
b. SOAP relies on other transport protocols like http, ftp for data trasmission  
c. SOAP uses xml to format data  
d. SOAP uses json to format data  
ans:a,b,c  
1
0.There are two approaches to develop a web service, depending on whether you define the  
contract first or last.  
a) True  
b) False  
ans:a  
1
1.In contrast, the contract-first approach encourages you to think of the service contract first in  
terms of :-  
a.XML  
b.XML Schema(.xsd)  
c.WSDL  
d.All of the mentioned  
ans:d  
1
2.To send objects across the wire, beans need to be encoded using the Java Architecture for XML  
Binding (JAXB).  
a.True  
b.False  
ans:a  
1
3. If you are deploying into a Java EE 5 (or better) container, you may simply create a bean that is  
annotated with:-  
a. javax.jws.WebService  
b. javax.jws.WebServiceProvider  
c. a&b  
d. none of these  
ans:c  
1
4.Tomcat doesn’t support JAX-WS by itself.  
a.True  
b. False  
ans:a  
1
5. Which of the following role of web service architecture implements the service and makes it  
available on the Internet?  
a. Service Provider  
b. Service Requestor  
c. Service Registry  
d. None of the above  
ans:a  
1
6.The simpler approach of implementing a web service is named as  
a. Entity State Transfer  
b. JavaScript Entity Notation  
c. Representation State Transfer  
d. JavaScript Object Notation  
ans:c  
1
7.Coding and decoding, and transporting the data is performed by  
a. XML and UDDI  
b. XML and SOAP  
c. HTML and HTTP  
d. HTML and SOAP  
ans:b  
1
8.Web Services are  
a.Loosely Coupled  
b.Tightly Coupled  
c.Either Loosely or Tightly Coupled  
d.Neither Loosely nor Tightly Coupled  
ans:a  
1
9.Which of the following is true about Web services?  
a.Web services are open standard (XML, SOAP, HTTP etc.) based Web applications.  
b.Web services interact with other web applications for the purpose of exchanging data.  
c.Web Services can convert your existing applications into Web-applications.  
d.All of the above.  
ans:d  
2
0.Which of the following is correct statement about Synchronicity?  
a.Synchronicity refers to the binding of the client to the execution of the service.  
b.In synchronous invocations, the client blocks and waits for the service to complete its operation  
before continuing.  
c.Asynchronous operations allow a client to invoke a service and then execute other functions.  
d.All of the above  
ans:da  
2
1.How request is sent in XML-RPC?  
a.Requests are encoded in XML and sent via HTTP POST.  
b.Requests are encoded in XML and sent via HTTP GET.  
c.Both of the above.  
d.None of the above.  
ans:  
2
2.Which of the following is a security issue with web services?  
a.Confidentiality  
b.Authentication  
c.Network Security  
d.All of the above  
ans:d  
2
3.URL means ________.  
a.Address of the resource on the web  
b.Term used to describe Website  
c.Term used to get online program  
d.None of these  
ans:a  
2
4. Rest is stateful.  
a.True b.False  
ans:b  
2
5.What is the full form of JSON?  
a.JavaScript Object Native  
b.JavaScript Object Notation  
c.JavaScript Object Negation  
d.Java Object Notation  
ans:b  
2
6. The Service requestor provides a central place where developers can publish new services or find  
existing ones.  
a.True  
b.False  
ans:b  
2
7. Which of the following is correctly defining loosely coupled architecture of web service?  
a. A consumer of a web service is not tied to that web service directly.  
b. The web service interface can change over time without compromising the client's ability to  
interact with the service.  
c.Adopting a loosely coupled architecture tends to make software systems more manageable and  
allows simpler integration between different systems.  
d. All of the above.  
ans:d  
2
8. Which of the following is correct about UDDI?  
a. UDDI is an XML-based standard for describing, publishing, and finding web services.  
b.UDDI is a specification for a distributed registry of web services.  
c.UDDI is platform independent, open framework.  
d. All of the above.  
ans:d  
2
9.Which of the following is true about behavioral characteristics of web services?  
a. Asynchronous clients retrieve their result at a later point in time, while synchronous clients  
receive their result when the service has completed.  
b. A web service supports RPC by providing services of its own, equivalent to those of a traditional  
component, or by translating incoming invocations into an invocation of an EJB or a .NET  
component.  
c.Web services support the transparent exchange of documents to facilitate business integration.  
d.All of the above.  
ans:d  
3
0.Which of the following is correct about XML Messaging layer in Web Service Protocol Stack?  
a.This layer is responsible for encoding messages in a common XML format so that messages can be  
understood at either end.  
b.Currently, this layer includes XML-RPC and SOAP.  
c.Both of the above.  
d.None of the above.  
ans:c